chore(deps): update gcr.io/distroless/static-debian12:debug docker di… #101
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: CI | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
env: | |
IMAGE: "ghcr.io/${{ github.repository }}" | |
PLATFORMS: "linux/amd64,linux/arm64" | |
REGISTRY: "ghcr.io" | |
TEST_TAG: "ghcr.io/${{ github.repository }}:test" | |
jobs: | |
docker: | |
name: Docker | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3 | |
- name: Log in to the Container registry | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build test image | |
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6 | |
with: | |
context: . | |
load: true | |
tags: ${{ env.TEST_TAG }} | |
cache-from: type=gha | |
- name: Validate Container | |
id: validate | |
run: | | |
docker run --rm -i --entrypoint=/usr/local/bin/buildpulse-test-reporter ${{ env.TEST_TAG }} --help 2>&1 \ | |
| grep 'buildpulse-test-reporter submit TEST_RESULTS_PATH' | |
version="$(docker image inspect ${{ env.TEST_TAG }} --format='{{ index .Config.Labels "org.opencontainers.image.version" }}')" | |
echo "tags=${IMAGE}:latest,${IMAGE}:${version}" >> "$GITHUB_OUTPUT" | |
- name: Build images | |
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6 | |
with: | |
context: . | |
platforms: ${{ env.PLATFORMS }} | |
push: ${{ github.ref == 'refs/heads/main' }} | |
tags: ${{ steps.validate.outputs.tags }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |