Skip to content

Commit f2cbd31

Browse files
committed
Merge branch 'upstream-PR/00-workflow-test-nobs'
# Conflicts: # .github/workflows/build.yaml
2 parents 7537ca5 + 5dfaea9 commit f2cbd31

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/build.yaml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ on:
99
inputs:
1010
force:
1111
description: Force rebuild and republish all image tags
12-
required: false
1312
default: true
1413
type: boolean
15-
image_name:
14+
image-name:
1615
description: Override image name for this manual run
17-
required: false
1816
default: ""
1917
type: string
2018

2119
env:
22-
IMAGE_NAME: ${{ inputs.image_name || vars.IMAGE_NAME || 'nikolaik/python-nodejs' }}
20+
IMAGE_NAME: ${{ inputs.image-name || vars.IMAGE_NAME || 'nikolaik/python-nodejs' }}
2321

2422
jobs:
2523
generate-matrix:
@@ -40,7 +38,12 @@ jobs:
4038
- name: Generate build matrix
4139
id: set-matrix
4240
run: |
43-
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)
41+
FORCE=
42+
if [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ inputs.force }}" == "true" ]]; then
43+
FORCE="--force"
44+
elif git log --pretty=format:"%s" HEAD^..HEAD | grep -q '\[force\]'; then
45+
FORCE="--force"
46+
fi
4447
uv run dpn $FORCE build-matrix --event ${{ github.event_name }}
4548
4649
@@ -78,7 +81,10 @@ jobs:
7881
# Test
7982
- name: Run smoke tests
8083
run: |
81-
docker run --rm ${{ env.IMAGE_NAME }}:${{ matrix.key }}-${{ matrix.arch }} sh -c "node --version && npm --version && yarn --version && python --version && pip --version && pipenv --version && poetry --version && uv --version"
84+
docker run --rm ${{ env.IMAGE_NAME }}:${{ matrix.key }}-${{ matrix.arch }} sh -c \
85+
"node --version && npm --version && yarn --version && \
86+
python --version && pip --version && pipenv --version && \
87+
poetry --version && uv --version"
8288
8389
# Push
8490
- name: Login to Docker Hub
@@ -132,7 +138,10 @@ jobs:
132138
run: |
133139
mkdir builds/
134140
digest="${{ steps.push-manifest.outputs.digest }}"
135-
echo '${{ toJSON(matrix) }}' | jq --arg digest "$digest" '. +={"digest": $digest}' >> "builds/${{ matrix.key }}.json"
141+
echo '${{ toJSON(matrix) }}' |
142+
jq --arg digest "$digest" \
143+
'. +={"digest": $digest}' \
144+
>> "builds/${{ matrix.key }}.json"
136145
137146
- name: Upload build context
138147
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0

0 commit comments

Comments
 (0)