File tree Expand file tree Collapse file tree 1 file changed +14
-33
lines changed Expand file tree Collapse file tree 1 file changed +14
-33
lines changed Original file line number Diff line number Diff line change @@ -2,46 +2,27 @@ name: Release Danger-JS package
2
2
3
3
on :
4
4
push :
5
- branches :
6
- - ' master'
7
5
tags :
8
6
- ' *'
9
7
10
- env :
11
- REGISTRY : ghcr.io
12
- IMAGE_NAME : ${{ github.repository }}
13
-
14
8
jobs :
15
9
build :
16
- runs-on : ubuntu-latest
17
- permissions :
18
- contents : read
19
- packages : write
10
+ runs-on : ubuntu-20.04
20
11
21
12
steps :
22
- - name : Checkout
23
- uses : actions/checkout@v3
13
+ - uses : actions/checkout@v3
14
+
15
+ - name : Export tag version
16
+ run : echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
24
17
25
- - name : Log in to the Container registry
26
- uses : docker/login-action@v2
27
- with :
28
- registry : ${{ env.REGISTRY }}
29
- username : ${{ github.actor }}
30
- password : ${{ secrets.GITHUB_TOKEN }}
18
+ - name : Docker Login
19
+ run : echo $PACKAGES_WRITE_TOKEN | docker login ghcr.io -u $USERNAME --password-stdin
20
+ env :
21
+ PACKAGES_WRITE_TOKEN : ${{ secrets.DOCKER_GITHUB_PASSWORD }}
22
+ USERNAME : ${{ secrets.DOCKER_GITHUB_USERNAME }}
31
23
32
- - name : Set up Docker metadata
33
- id : meta
34
- uses : docker/metadata-action@v4
35
- with :
36
- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
37
- tags : |
38
- type=ref,event=branch
39
- type=ref,event=tag
24
+ - name : Docker Build
25
+ run : docker build -t ghcr.io/danger/danger-js:$VERSION .
40
26
41
- - name : Build and push Docker image
42
- uses : docker/build-push-action@v4
43
- with :
44
- context : .
45
- push : true
46
- tags : ${{ steps.meta.outputs.tags }}
47
- labels : ${{ steps.meta.outputs.labels }}
27
+ - name : Deploy
28
+ run : docker push ghcr.io/danger/danger-js:$VERSION
You can’t perform that action at this time.
0 commit comments