File tree 1 file changed +7
-10
lines changed
1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -27,24 +27,21 @@ jobs:
27
27
username : ${{ secrets.DOCKER_USERNAME }}
28
28
password : ${{ secrets.DOCKER_PASSWORD }}
29
29
30
- - name : Extract metadata (tags, labels) for Docker
31
- id : meta
32
- uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
33
- with :
34
- images : ${{ env.IMAGE_NAME }}
30
+ - name : Extract version from package.json
31
+ id : version
32
+ run : echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
35
33
36
- - name : Print metadata
37
- run : echo " ${{ steps.meta.outputs.tags }}" "${{ steps.meta.outputs.labels }}"
34
+ - name : Print version
35
+ run : echo ${{ env.VERSION }}
38
36
39
37
- name : Build and push Docker image
40
38
id : push
41
- uses : docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
39
+ uses : docker/build-push-action@v4
42
40
with :
43
41
context : .
44
42
file : ./Dockerfile
45
43
push : true
46
- tags : ${{ steps.meta.outputs.tags }}
47
- labels : ${{ steps.meta.outputs.labels }}
44
+ tags : ${{ env.IMAGE_NAME }}:${{ env.VERSION }}
48
45
49
46
- name : Generate artifact attestation
50
47
uses : actions/attest-build-provenance@v1
You can’t perform that action at this time.
0 commit comments