2727 uses : actions/checkout@v4
2828 with :
2929 ref : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref }}
30+ fetch-depth : 0
3031
3132 - name : Set up Docker Buildx
3233 uses : docker/setup-buildx-action@v3
4445 username : ${{ github.actor }}
4546 password : ${{ secrets.GITHUB_TOKEN }}
4647
47- - name : Set tag for manual dispatch
48- if : github.event_name == 'workflow_dispatch'
49- run : |
50- echo "MANUAL_TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
51- git tag ${{ github.event.inputs.tag }} || true
52-
5348 - name : Extract metadata (tags, labels) for Docker
5449 id : meta
5550 uses : docker/metadata-action@v5
@@ -58,10 +53,11 @@ jobs:
5853 gmag11/metatrader5_vnc
5954 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6055 tags : |
61- type=semver,pattern={{version}}
62- type=semver,pattern={{major}}.{{minor}}
63- type=semver,pattern={{major}}
64- type=raw,value=latest
56+ type=semver,pattern={{version}},enable=${{ github.event_name == 'push' }}
57+ type=semver,pattern={{major}}.{{minor}},enable=${{ github.event_name == 'push' }}
58+ type=semver,pattern={{major}},enable=${{ github.event_name == 'push' }}
59+ type=raw,value=latest,enable=${{ github.event_name == 'push' }}
60+ type=raw,value=${{ github.event.inputs.tag }},enable=${{ github.event_name == 'workflow_dispatch' }}
6561
6662 - name : Build and push Docker image
6763 id : docker_build
0 commit comments