File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 11name : Build-Test-Push
2+
23on :
34 workflow_dispatch :
5+ inputs :
6+ tag :
7+ description : Optional tag to create in addition to the `latest` and `<timestamp>-<sha>` image tags.
8+ required : false
49 push :
510 branches :
611 - main
12+
713jobs :
814 Build-Test-Push :
915 runs-on : ubuntu-latest
2935 run : |
3036 docker tag puppet-dev-tools:latest-rootless ${{ secrets.DOCKERHUB_PUSH_USERNAME }}/puppet-dev-tools:$(date +"%F")-$(git rev-parse --short HEAD)-rootless
3137 docker tag puppet-dev-tools:latest ${{ secrets.DOCKERHUB_PUSH_USERNAME }}/puppet-dev-tools:$(date +"%F")-$(git rev-parse --short HEAD)
38+ - name : Additional Tag
39+ if : inputs.tag
40+ run : |
41+ docker tag puppet-dev-tools:latest-rootless ${{ secrets.DOCKERHUB_PUSH_USERNAME }}/puppet-dev-tools:${{ inputs.tag }}-rootless
42+ docker tag puppet-dev-tools:latest ${{ secrets.DOCKERHUB_PUSH_USERNAME }}/puppet-dev-tools:${{ inputs.tag }}
3243 - name : List Docker images
3344 run : docker images --filter "reference=puppet-dev-tools*" --filter "reference=*/puppet-dev-tools*"
3445 - name : Show Docker image labels
4051 run : |
4152 docker push ${{ secrets.DOCKERHUB_PUSH_USERNAME }}/puppet-dev-tools:$(date +"%F")-$(git rev-parse --short HEAD)-rootless
4253 docker push ${{ secrets.DOCKERHUB_PUSH_USERNAME }}/puppet-dev-tools:$(date +"%F")-$(git rev-parse --short HEAD)
54+ - name : Push Additional Tag
55+ if : inputs.tag
56+ run : |
57+ docker push ${{ secrets.DOCKERHUB_PUSH_USERNAME }}/puppet-dev-tools:${{ inputs.tag }}-rootless
58+ docker push ${{ secrets.DOCKERHUB_PUSH_USERNAME }}/puppet-dev-tools:${{ inputs.tag }}
You can’t perform that action at this time.
0 commit comments