Merge pull request #2403 from nspcc-dev/extend-publish

github: add ability to manually trigger publishing workflow with `latest` tag
This commit is contained in:
Roman Khimov 2022-03-21 18:41:43 +03:00 committed by GitHub
commit 13999252c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,10 @@ on:
description: 'Push images to DockerHub [default: false; examples: true, false]' description: 'Push images to DockerHub [default: false; examples: true, false]'
required: false required: false
default: 'false' default: 'false'
use_latest_tag:
description: 'Use `latest` tag while pushing images to DockerHub (applied to Ubuntu image only) [default: false; examples: true, false]'
required: false
default: 'false'
# Environment variables. # Environment variables.
env: env:
@ -82,7 +86,7 @@ jobs:
run: make image run: make image
- name: Build image with 'latest' tag - name: Build image with 'latest' tag
if: ${{ github.event_name == 'release' && github.event.release.target_commitish == 'master' }} if: ${{ (github.event_name == 'release' && github.event.release.target_commitish == 'master') || (github.event_name == 'workflow_dispatch' && github.event.inputs.push_image == 'true' && github.event.inputs.use_latest_tag == 'true') }}
run: make image-latest run: make image-latest
- name: Login to DockerHub - name: Login to DockerHub
@ -96,7 +100,7 @@ jobs:
run: make image-push run: make image-push
- name: Push image with 'latest' tag to registry - name: Push image with 'latest' tag to registry
if: ${{ github.event_name == 'release' && github.event.release.target_commitish == 'master' }} if: ${{ (github.event_name == 'release' && github.event.release.target_commitish == 'master') || (github.event_name == 'workflow_dispatch' && github.event.inputs.push_image == 'true' && github.event.inputs.use_latest_tag == 'true') }}
run: make image-push-latest run: make image-push-latest
tests_wsc: tests_wsc: