-
Notifications
You must be signed in to change notification settings - Fork 20
55 lines (51 loc) · 1.36 KB
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: StromaeV3 Build Docker
on:
push:
branches:
- 'v3-master'
paths-ignore:
- 'docs/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: yarn
- run: yarn build
- name: Upload build
uses: actions/upload-artifact@v3
with:
name: build
path: build
check_if_version_upgraded:
needs: build
runs-on: ubuntu-latest
outputs:
stromae_version: ${{ steps.version.outputs.prop }}
steps:
- uses: actions/checkout@v3
- name: Get current version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: 'package.json'
prop_path: 'version'
docker:
needs: check_if_version_upgraded
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: build
path: build
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ secrets.DOCKERHUB_REGISTRY_HOST }}/stromae
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
tags: ${{ needs.check_if_version_upgraded.outputs.stromae_version }}