fix #333
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 Artifacts | |
| permissions: | |
| contents: read | |
| packages: write | |
| actions: read | |
| on: | |
| release: | |
| types: [created] | |
| push: | |
| branches: | |
| - '**' | |
| paths-ignore: | |
| - 'docs/**' | |
| - 'CODE-OF-CONDUCT.md' | |
| - 'CONTRIBUTING.md' | |
| - 'LICENSE' | |
| - 'README.md' | |
| - 'SECURITY.md' | |
| pull_request: | |
| branches: | |
| - '**' | |
| paths-ignore: | |
| - 'docs/**' | |
| - 'CODE-OF-CONDUCT.md' | |
| - 'CONTRIBUTING.md' | |
| - 'LICENSE' | |
| - 'README.md' | |
| - 'SECURITY.md' | |
| concurrency: | |
| # On main/release, we don't want any jobs cancelled so the sha is used to name the group | |
| # On PR branches, we cancel the job if new commits are pushed | |
| # More info: https://stackoverflow.com/a/68422069/253468 | |
| group: ${{ github.ref == 'refs/heads/main' && format('ci-main-{0}', github.sha) || format('ci-main-{0}', github.ref) }} | |
| cancel-in-progress: true | |
| jobs: | |
| multiplatform_build: | |
| if: github.event.pull_request.user.login != 'dependabot[bot]' || github.event_name == 'pull_request' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| component: | |
| - name: qubership-zookeeper-integration-tests | |
| file: integration-tests/docker/Dockerfile | |
| context: integration-tests | |
| - name: qubership-zookeeper-operator | |
| file: operator/Dockerfile | |
| context: operator | |
| - name: qubership-zookeeper-transfer | |
| file: docker-transfer/Dockerfile | |
| context: "" | |
| - name: qubership-zookeeper-backup-daemon | |
| file: backup-daemon/docker/Dockerfile | |
| context: backup-daemon | |
| - name: qubership-zookeeper-monitoring | |
| file: monitoring/docker/Dockerfile | |
| context: monitoring | |
| - name: qubership-docker-zookeeper | |
| file: docker-zookeeper/docker/Dockerfile | |
| context: docker-zookeeper | |
| runs-on: ubuntu-latest | |
| name: ${{ matrix.component.name }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| ghcr.io/${{ github.repository_owner }}/${{ matrix.component.name }} | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=tag | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Get package IDs for delete | |
| id: get-ids-for-delete | |
| uses: Netcracker/get-package-ids@v0.0.1 | |
| with: | |
| component-name: ${{ matrix.component.name }} | |
| component-tag: ${{ steps.meta.outputs.tags }} | |
| access-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| no-cache: true | |
| context: ${{ matrix.component.context }} | |
| file: ${{ matrix.component.file }} | |
| platforms: linux/amd64,linux/arm64 | |
| # See https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#fetching-metadata-about-a-pull-request | |
| push: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]' }} | |
| provenance: false | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} |