File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 types : [published]
66 push :
77 branches :
8- - main
8+ - master
99 workflow_dispatch :
1010
1111jobs :
@@ -30,20 +30,22 @@ jobs:
3030 username : ${{ github.actor }}
3131 password : ${{ secrets.GITHUB_TOKEN }}
3232
33- - name : Extract metadata
34- id : meta
35- uses : docker/metadata-action@v4
36- with :
37- images : ghcr.io/${{ github.repository_owner }}/etherproxy
38- tags : |
39- type=ref,event=tag
40- type=ref,event=branch
41- type=sha
33+ - name : Get version from package.json
34+ id : package-version
35+ run : |
36+ VERSION=$(node -p "require('./package.json').version")
37+ echo "VERSION=$VERSION" >> $GITHUB_ENV
38+ echo "version=$VERSION" >> $GITHUB_OUTPUT
4239
4340 - name : Build and push Docker image
4441 uses : docker/build-push-action@v4
4542 with :
4643 context : .
4744 push : true
48- tags : ${{ steps.meta.outputs.tags }}
49- labels : ${{ steps.meta.outputs.labels }}
45+ platforms : linux/amd64,linux/arm64/v8
46+ tags : |
47+ ghcr.io/${{ github.repository_owner }}/etherproxy:${{ env.VERSION }}
48+ ghcr.io/${{ github.repository_owner }}/etherproxy:latest
49+ labels : |
50+ org.opencontainers.image.version=${{ env.VERSION }}
51+ org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
You can’t perform that action at this time.
0 commit comments