Update images digests #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
jobs: | |
presubmit-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.generate-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | |
- id: files | |
uses: jitterbit/get-changed-files@b17fbb00bdc0c0f63fcf166580804b4d2cdc2a42 # v1 | |
with: | |
format: csv | |
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | |
with: | |
repository: chainguard-images/images | |
- id: generate-matrix | |
uses: ./.github/actions/generate-matrix | |
with: | |
modified-files: ${{ steps.files.outputs.all }} | |
repository: chainguard-images/images | |
presubmit-build: | |
runs-on: ubuntu-latest | |
needs: presubmit-matrix | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.presubmit-matrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | |
with: | |
repository: chainguard-images/images | |
- name: Add additional inputs | |
id: augmented-inputs | |
env: | |
EXTRA_INPUT_APKO_IMAGE: ghcr.io/wolfi-dev/apko:latest@sha256:9463df6e292646f5087429e019bc0c8a6e163792fc217898064ad49ad81dde11 | |
run: | | |
# convert env vars beginning with "EXTRA_INPUT_" | |
# to camelcased input variables passed to next step | |
set -x | |
echo '${{ toJSON(matrix) }}' > inputs.json | |
for kv in `env | grep '^EXTRA_INPUT_' | sed 's/^EXTRA_INPUT_//'`; do | |
k="$(echo "${kv}" | cut -d "=" -f1 | tr '[:upper:]' '[:lower:]' | sed -r 's/(.)_+(.)/\1\U\2/g;s/^[a-z]/\U&/' | sed 's/.*/\l&/')" | |
v="$(echo "${kv}" | cut -d "=" -f2)" | |
cat inputs.json | jq -c '. + {'${k}': "'${v}'"}' > inputs.json.tmp | |
mv inputs.json.tmp inputs.json | |
done | |
echo "augmented-inputs=$(cat inputs.json | tr -d '\n')" >> $GITHUB_OUTPUT | |
- uses: ./.github/actions/build-image | |
with: ${{ fromJSON(steps.augmented-inputs.outputs.augmented-inputs) }} | |
presubmit-roundup: | |
runs-on: ubuntu-latest | |
needs: presubmit-build | |
steps: | |
- run: | | |
echo "all matrix jobs completed" |