Hot fix to e2e test on Openshift #961
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 Controller Image | |
| on: | |
| push: | |
| paths: | |
| - ".github/workflows/build-controller-image.yml" | |
| - Makefile | |
| - cmd/dual-pods-controller/** | |
| - pkg/** | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| packages: write | |
| attestations: write | |
| id-token: write | |
| jobs: | |
| debug: | |
| name: print relevant info | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: | | |
| echo "github.actor=${{ github.actor }}" | |
| echo "github.action_ref=${{ github.action_ref }}" | |
| echo "github.event_name=${{ github.event_name }}" | |
| echo "github.head_ref=$GITHUB_HEAD_REF" | |
| echo "github.ref=${{ github.ref }}" | |
| echo "github.ref_name=${{ github.ref_name }}" | |
| echo "github.repository=${{ github.repository }}" | |
| echo "github.repository_owner=${{ github.repository_owner }}" | |
| echo "github.triggering_actor=${{ github.triggering_actor }}" | |
| echo "GITHUB_ACTION_REF=$GITHUB_ACTION_REF" | |
| build-and-push: | |
| if: "${{ github.repository_owner == github.actor }}" | |
| strategy: | |
| fail-fast: false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install ko | |
| uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Log in to Container Registry | |
| uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 | |
| - name: Doit | |
| run: | | |
| reg=${{ github.repository }} | |
| make build-controller CONTAINER_IMG_REG=ghcr.io/${reg@L} | |
| build-only: | |
| if: "${{ github.repository_owner != github.actor }}" | |
| strategy: | |
| fail-fast: false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install ko | |
| uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Log in to Container Registry | |
| uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 | |
| - name: Doit | |
| run: | | |
| make build-controller-local |