Update NEWS.md #994
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
name: Build Images | |
on: | |
pull_request: | |
push: | |
workflow_dispatch: | |
jobs: | |
build-nginx-on-all-arches: | |
name: build-nginx-all-arches | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
arch: [x86_64, "386", armv7, aarch64, riscv64, s390x, ppc64le] | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v2.4.0 | |
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v2.1.5 | |
with: | |
go-version: "1.20" | |
check-latest: true | |
- name: Setup QEMU | |
uses: docker/[email protected] | |
- name: build | |
run: | | |
make apko | |
./apko version | |
- name: build image | |
timeout-minutes: 15 | |
run: | | |
./apko build ./examples/nginx.yaml nginx:build /tmp/nginx-${{ matrix.arch }}.tar --debug --arch ${{ matrix.arch }} | |
build-all-examples-one-arch: | |
name: build-all-examples-amd64 | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v2.4.0 | |
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v2.1.5 | |
with: | |
go-version: "1.20" | |
check-latest: true | |
- name: build | |
run: | | |
make apko | |
./apko version | |
- name: build images | |
timeout-minutes: 15 | |
run: | | |
for cfg in $(find ./examples/ -name '*.yaml'); do | |
name=$(basename ${cfg} .yaml) | |
./apko build ${cfg} ${name}:build /tmp/${name}.tar --debug --arch amd64 | |
done | |
build-alpine-source-date-epoch: | |
name: source-date-epoch | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v2.4.0 | |
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v2.1.5 | |
with: | |
go-version: "1.20" | |
check-latest: true | |
- name: Setup QEMU | |
uses: docker/[email protected] | |
- name: build | |
run: | | |
make apko | |
./apko version | |
- uses: chainguard-dev/actions/setup-registry@main | |
with: | |
port: 5000 | |
- name: build image (w/ source date epoch) | |
shell: bash | |
timeout-minutes: 15 | |
env: | |
SOURCE_DATE_EPOCH: "0" | |
run: | | |
FIRST=$(./apko publish ./examples/alpine-base.yaml localhost:5000/alpine 2> /dev/null) | |
for idx in {2..10} | |
do | |
NEXT=$(./apko publish ./examples/alpine-base.yaml localhost:5000/alpine 2> /dev/null) | |
if [ "${FIRST}" = "${NEXT}" ]; then | |
echo "Build ${idx} matches." | |
else | |
echo "Build ${idx} differs: ${FIRST} and ${NEXT}" | |
exit 1 | |
fi | |
done | |
build-alpine-build-date-epoch: | |
name: build-date-epoch | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v2.4.0 | |
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v2.1.5 | |
with: | |
go-version: "1.20" | |
check-latest: true | |
- name: Setup QEMU | |
uses: docker/[email protected] | |
- name: build | |
run: | | |
make apko | |
./apko version | |
- uses: chainguard-dev/actions/setup-registry@main | |
with: | |
port: 5000 | |
- name: build image (w/ build date epoch) | |
shell: bash | |
timeout-minutes: 15 | |
run: | | |
# Without SOURCE_DATE_EPOCH set, the timestamp of the image will be computed to be | |
# the maximum build date of the resolved APKs. | |
FIRST=$(./apko publish ./examples/alpine-base.yaml localhost:5000/alpine 2> /dev/null) | |
for idx in {2..10} | |
do | |
NEXT=$(./apko publish ./examples/alpine-base.yaml localhost:5000/alpine 2> /dev/null) | |
if [ "${FIRST}" = "${NEXT}" ]; then | |
echo "Build ${idx} matches." | |
else | |
echo "Build ${idx} differs: ${FIRST} and ${NEXT}" | |
exit 1 | |
fi | |
done | |
annotations: | |
name: annotations | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v2.4.0 | |
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v2.1.5 | |
with: | |
go-version: "1.20" | |
check-latest: true | |
- uses: imjasonh/setup-crane@00c9e93efa4e1138c9a7a5c594acd6c75a2fbf0c # v0.3 | |
- uses: chainguard-dev/actions/setup-registry@main | |
with: | |
port: 5000 | |
- name: build | |
run: | | |
make apko | |
./apko version | |
# Build image with annotations. | |
ref=$(./apko publish ./examples/nginx.yaml localhost:5000/nginx) | |
# Check index annotations. | |
crane manifest $ref | jq -r '.annotations.foo' | grep bar | |
# Check per-image annotations. | |
crane manifest --platform=linux/arm64 $ref | jq -r '.annotations.foo' | grep bar |