Skip to content

Fix the sync script's ability to query the GitLab API for a private project #261

Fix the sync script's ability to query the GitLab API for a private project

Fix the sync script's ability to query the GitLab API for a private project #261

name: Build Docker Images
on:
push:
branches:
- main
paths:
- images/**
- .github/workflows/custom_docker_builds.yml
pull_request:
paths:
- images/**
- .github/workflows/custom_docker_builds.yml
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- docker-image: ./images/gh-gl-sync
image-tags: ghcr.io/spack/ci-bridge:0.0.39
- docker-image: ./images/gitlab-api-scrape
image-tags: ghcr.io/spack/gitlab-api-scrape:0.0.3
- docker-image: ./images/ci-key-rotate
image-tags: ghcr.io/spack/ci-key-rotate:0.0.5
- docker-image: ./images/ci-key-clear
image-tags: ghcr.io/spack/ci-key-clear:0.0.2
- docker-image: ./images/gitlab-stuckpods
image-tags: ghcr.io/spack/stuckpods:0.0.1
- docker-image: ./images/gitlab-clear-pipelines
image-tags: ghcr.io/spack/gitlab-clear-pipelines:0.0.1
- docker-image: ./images/gitlab-skipped-pipelines
image-tags: ghcr.io/spack/gitlab-skipped-pipelines:0.0.1
- docker-image: ./images/notary
image-tags: ghcr.io/spack/notary:latest
- docker-image: ./images/python-aws-bash
image-tags: ghcr.io/spack/python-aws-bash:0.0.2
- docker-image: ./images/gitlab-error-processor
image-tags: ghcr.io/spack/gitlab-error-processor:0.0.3
- docker-image: ./images/upload-gitlab-failure-logs
image-tags: ghcr.io/spack/upload-gitlab-failure-logs:0.0.3
- docker-image: ./images/snapshot-release-tags
image-tags: ghcr.io/spack/snapshot-release-tags:0.0.4
- docker-image: ./images/cache-indexer
image-tags: ghcr.io/spack/cache-indexer:0.0.3
- docker-image: ./images/build-timing-processor
image-tags: ghcr.io/spack/build-timing-processor:0.0.4
- docker-image: ./analytics
image-tags: ghcr.io/spack/upload-build-timings:0.0.4
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Set up QEMU
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Log in to the Container registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build ${{ (github.ref == 'refs/heads/main' && 'and push ') || '' }}${{ matrix.docker-image }}
id: docker-build-push
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
with:
context: ${{ matrix.docker-image }}
file: ${{ matrix.docker-image }}/Dockerfile
push: ${{ github.ref == 'refs/heads/main' }} # only publish image on push to main
tags: ${{ matrix.image-tags }}
platforms: linux/amd64,linux/arm64
- name: Image digest
run: echo ${{ steps.docker-build-push.outputs.digest }}