File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 branches : [main]
66 schedule :
77 - cron : " 0 00,12 * * *" # Twice a day
8+ workflow_dispatch :
9+ inputs :
10+ force :
11+ description : Force rebuild and republish all image tags
12+ required : false
13+ default : true
14+ type : boolean
15+ image_name :
16+ description : Override image name for this manual run
17+ required : false
18+ default : " "
19+ type : string
20+
21+ env :
22+ IMAGE_NAME : ${{ inputs.image_name || vars.IMAGE_NAME || 'nikolaik/python-nodejs' }}
823
924jobs :
1025 generate-matrix :
2338 - name : Generate build matrix
2439 id : set-matrix
2540 run : |
26- FORCE=$(if git log --pretty=format:"%s" HEAD^..HEAD | grep -q '\[force\]'; then echo "--force"; else echo ""; fi)
41+ FORCE=$(if [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ inputs.force }}" == "true" ]]; then echo "--force"; elif git log --pretty=format:"%s" HEAD^..HEAD | grep -q '\[force\]'; then echo "--force"; else echo ""; fi)
2742 uv run dpn $FORCE build-matrix --event ${{ github.event_name }}
2843
2944
@@ -59,12 +74,12 @@ jobs:
5974 context : .
6075 file : dockerfiles/${{ matrix.key }}.Dockerfile
6176 load : true
62- tags : nikolaik/python-nodejs :${{ matrix.key }}
77+ tags : ${{ env.IMAGE_NAME }} :${{ matrix.key }}
6378
6479 # Test
6580 - name : Run smoke tests
6681 run : |
67- docker run --rm nikolaik/python-nodejs :${{ matrix.key }} sh -c "node --version && npm --version && yarn --version && python --version && pip --version && pipenv --version && poetry --version && uv --version"
82+ docker run --rm ${{ env.IMAGE_NAME }} :${{ matrix.key }} sh -c "node --version && npm --version && yarn --version && python --version && pip --version && pipenv --version && poetry --version && uv --version"
6883
6984 # Push image
7085 - name : Push image
7590 file : dockerfiles/${{ matrix.key }}.Dockerfile
7691 platforms : ${{ join(matrix.platforms) }}
7792 push : true
78- tags : nikolaik/python-nodejs :${{ matrix.key }}
93+ tags : ${{ env.IMAGE_NAME }} :${{ matrix.key }}
7994
8095 # Store build context
8196 - name : Add digest to build context
You can’t perform that action at this time.
0 commit comments