Skip to content

Commit

Permalink
Add prime image builds
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandr Demicev <alexandr.demicev@suse.com>
  • Loading branch information
alexander-demicev authored and Danil-Grigorev committed Oct 8, 2024
1 parent 53242ec commit c902e98
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

env:
TAG: ${{ github.ref_name }}
REGISTRY: ghcr.io
GHCR_REGISTRY: ghcr.io

jobs:
build:
Expand All @@ -24,16 +24,32 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: '=1.21.8'
- name: Docker login
- name: Docker login ghcr.io
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build docker image
- name: Build docker image for ghcr.io
run: make docker-build-all TAG=${{ env.TAG }}
- name: Push docker image
run: make docker-push-all TAG=${{ env.TAG }} PROD_REGISTRY=${{ env.REGISTRY }}
- name: Push docker image to ghcr.io
run: make docker-push-all TAG=${{ env.TAG }} PROD_REGISTRY=${{ env.GHCR_REGISTRY }}
- name: Read prime registry secrets
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ inputs.github_repository_for_docker }}/registry/prime/rancher/cluster-api-controller/credentials username | DOCKER_USERNAME;
secret/data/github/repo/${{ inputs.github_repository_for_docker }}/registry/prime/rancher/cluster-api-controller/credentials password | DOCKER_PASSWORD;
- name: Docker login to registry
uses: docker/login-action@v3
with:
registry: ${{ vars.PRIME_REGISTRY }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
- name: Build docker image for prime registry
run: make docker-build-all TAG=${{ env.TAG }}
- name: Push docker image to prime registry
run: make docker-push-all TAG=${{ env.TAG }} PROD_REGISTRY=${{ vars.PRIME_REGISTRY }}
release:
runs-on: ubuntu-latest
permissions:
Expand Down

0 comments on commit c902e98

Please sign in to comment.