File tree Expand file tree Collapse file tree 2 files changed +47
-2
lines changed Expand file tree Collapse file tree 2 files changed +47
-2
lines changed Original file line number Diff line number Diff line change 26
26
- run : npm install
27
27
- run : npm run build
28
28
29
+ docker :
30
+ runs-on : ubuntu-latest
31
+ steps :
32
+ - uses : actions/checkout@v2
33
+ - name : Set up QEMU
34
+ uses : docker/setup-qemu-action@v1
35
+ - name : Set up Docker Buildx
36
+ uses : docker/setup-buildx-action@v1
37
+ - name : Build docker image (no push)
38
+ uses : docker/build-push-action@v2
39
+
29
40
commitlint :
30
41
runs-on : ubuntu-latest
31
42
steps :
38
49
39
50
release :
40
51
name : Publish new release
41
- needs : [build, lint, commitlint]
52
+ needs : [build, lint, docker, commitlint]
42
53
if : github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
43
54
runs-on : ubuntu-latest
44
55
steps :
50
61
node-version : 14
51
62
- name : Release
52
63
env :
53
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
64
+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
54
65
run : npx semantic-release
Original file line number Diff line number Diff line change
1
+ name : Release workflow
2
+
3
+ on :
4
+ release :
5
+ types : [created]
6
+
7
+ jobs :
8
+ porter-deploy :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout
12
+ uses : actions/checkout@v2
13
+ - name : Get the tag
14
+ id : get_tag
15
+ run : echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//}
16
+ - name : Set up QEMU
17
+ uses : docker/setup-qemu-action@v1
18
+ - name : Set up Docker Buildx
19
+ uses : docker/setup-buildx-action@v1
20
+ - name : Login to Scaleway Container Registry
21
+ uses : docker/login-action@v1
22
+ with :
23
+ registry : rg.fr-par.scw.cloud/codebench
24
+ username : nologin
25
+ password : ${{ secrets.SCW_SECRET_KEY }}
26
+ - name : Build and push
27
+ uses : docker/build-push-action@v2
28
+ with :
29
+ push : true
30
+ tags : |
31
+ rg.fr-par.scw.cloud/codebench/api:${{ steps.get_tag.outputs.tag }}
32
+ rg.fr-par.scw.cloud/codebench/api:latest
33
+ - name : Deploy on Porter
34
+ run : curl -X POST "https://dashboard.getporter.dev/api/webhooks/deploy/${{secrets.PORTER_WEBHOOK}}?commit=${{ steps.get_tag.outputs.tag }}"
You can’t perform that action at this time.
0 commit comments