@cryptotaxi247 / kubo / commits / 16859b3c7

ci: allow custom tags in docker-image workflow (#10099)

* ci: allow custom ref and tags in docker-image workflow * fix: ref default in case the workflow runs on push * chore: remove customisable ref from docker-image

Piotr Galar committed Aug 25, 2023 at 08:24 UTC 16859b3c70ee28905deb38a3c6e38420b93f3609
1 file changed +6 -1
.github/workflows/docker-image.yml
+6 -1
@@ -7,6 +7,10 @@ on:
7 description: 'Push to Docker Hub'
8 required: true
9 default: 'false'
10 + tags:
11 + description: 'Custom tags to use for the push'
12 + required: false
13 + default: ''
14 # # If we decide to build all images on every PR, we should make sure that
15 # # they are NOT pushed to Docker Hub.
16 # pull_request:
@@ -51,6 +55,7 @@ jobs:
55
56 - name: Get tags
57 id: tags
58 + if: github.event.inputs.tags == ''
59 run: |
60 echo "value<<EOF" >> $GITHUB_OUTPUT
61 ./bin/get-docker-tags.sh "$(date -u +%F)" >> $GITHUB_OUTPUT
@@ -117,7 +122,7 @@ jobs:
122 context: .
123 push: true
124 file: ./Dockerfile
120 - tags: "${{ steps.tags.outputs.value }}"
125 + tags: "${{ github.event.inputs.tags || steps.tags.outputs.value }}"
126 cache-from: type=local,src=/tmp/.buildx-cache-new
127 cache-to: type=local,dest=/tmp/.buildx-cache-new
128