push containers with tags

This commit is contained in:
Andy Pack 2023-09-19 18:14:58 +01:00
parent 5f9d4b8e85
commit a840cbe157
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7

View File

@ -46,7 +46,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [build, build-Js] # for ignoring bad builds needs: [build, build-Js] # for ignoring bad builds
if: github.event_name == 'push' && github.ref == 'refs/heads/master' if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -61,17 +61,21 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build CLI Container - name: Build CLI Container
uses: docker/build-push-action@v2 uses: docker/build-push-action@v5
with: with:
push: true push: true
tags: sarsoo/selector-cli:latest tags: |
sarsoo/selector-cli:latest
sarsoo/selector-cli:${{ github.ref_name }}
file: Dockerfile.CLI file: Dockerfile.CLI
- name: Build Web Container - name: Build Web Container
uses: docker/build-push-action@v2 uses: docker/build-push-action@v5
with: with:
push: true push: true
tags: sarsoo/selector-web:latest tags: |
sarsoo/selector-web:latest
sarsoo/selector-web:${{ github.ref_name }}
file: Dockerfile.Web file: Dockerfile.Web
build-Js: build-Js: