release ready workflows with metadata injection #157
Workflow file for this run
This file contains hidden or 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 & Publish CI Container | |
| on: | |
| push: {} | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| ci_changed: ${{ steps.filter.outputs.ci }} | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Detect CI‐container changes | |
| id: filter | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| ci: | |
| - '.github/containers/Containerfile.ci' | |
| - '.github/containers/**' | |
| build-and-push: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.ci_changed == 'true' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@main | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v1 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build & push multi-arch opensuse-15.5 image | |
| run: | | |
| docker buildx build \ | |
| --builder "$BUILDER_INSTANCE" \ | |
| --platform linux/amd64,linux/arm64 \ | |
| --file .github/containers/Containerfile.ci \ | |
| --tag ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/ci-runner:latest \ | |
| --push \ | |
| . | |
| - name: Build & push multi-arch opensuse-15.6 image | |
| run: | | |
| docker buildx build \ | |
| --builder "$BUILDER_INSTANCE" \ | |
| --platform linux/amd64,linux/arm64 \ | |
| --file .github/containers/Containerfile-opensuse156.ci \ | |
| --tag ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/ci-runner-opensuse156:latest \ | |
| --push \ | |
| . |