File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change 11name : Build Image
22
33on :
4+ workflow_dispatch :
45 push :
5- branches :
6- - develop
7-
6+ tags :
7+ - ' v*'
88jobs :
99 build_container_and_push :
1010 runs-on : ubuntu-latest
1313 - name : Checkout
1414 uses : actions/checkout@v3
1515
16+ - name : Docker meta
17+ id : meta
18+ uses : docker/metadata-action@v4
19+ with :
20+ images : |
21+ ghcr.io/${{ github.repository_owner }}
22+ ${{ secrets.DP_HARBOR_REGISTRY }}/dplc
23+ tags : type=semver,pattern={{version}}
24+
1625 - name : Setup Docker Buildx
1726 uses : docker/setup-buildx-action@v1
1827
3342 - name : Build and Push Container
3443 uses : docker/build-push-action@v2
3544 with :
36- tags : |
37- ghcr.io/${{ github.repository_owner }}/abacus:latest
38- ${{ secrets.DP_HARBOR_REGISTRY }}/dplc/abacus:latest
45+ tags : ${{ steps.meta.outputs.tags }}
3946 file : Dockerfile
40- cache-from : type=registry,ref=ghcr.io/${{ github.repository_owner }}/abacus:latest
41- cache-to : type=inline
42- push : true
47+ push : ${{ github.event_name == 'push' }}
You can’t perform that action at this time.
0 commit comments