Skip to content

Commit

Permalink
Change build repo dockerhub (#275)
Browse files Browse the repository at this point in the history
* changing krr action build repo

* test image-name

* changes for manual test

* reverting changes after test success

* add build to old repo

* added in gloud credentials
  • Loading branch information
Avi-Robusta authored Jun 11, 2024
1 parent 71d6d76 commit fd10b7c
Showing 1 changed file with 31 additions and 15 deletions.
46 changes: 31 additions & 15 deletions .github/workflows/docker-build-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,11 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up gcloud CLI
uses: google-github-actions/[email protected]
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: genuine-flight-317411
export_default_credentials: true

# Configure Docker to use the gcloud command-line tool as a credential helper for authentication
- name: Configure Docker
run: |-
gcloud auth configure-docker us-central1-docker.pkg.dev
- name: Verify gcloud configuration
run: |-
gcloud config get-value project
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand All @@ -38,6 +28,32 @@ jobs:
context: .
platforms: linux/arm64,linux/amd64
push: true
tags: us-central1-docker.pkg.dev/genuine-flight-317411/devel/krr:${{ github.ref_name }}
tags: robustadev/krr:${{ github.ref_name }}
build-args: |
BUILDKIT_INLINE_CACHE=1
- name: Set up gcloud CLI
uses: google-github-actions/[email protected]
with:
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: genuine-flight-317411
export_default_credentials: true

# Configure Docker to use the gcloud command-line tool as a credential helper for authentication
- name: Configure Docker
run: |-
gcloud auth configure-docker us-central1-docker.pkg.dev
- name: Verify gcloud configuration
run: |-
gcloud config get-value project
- name: Release Docker to old repo
run: |-
docker buildx build \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--platform linux/arm64,linux/amd64 \
--cache-from robustadev/krr:${{ github.ref_name }} \
--tag us-central1-docker.pkg.dev/genuine-flight-317411/devel/krr:${{ github.ref_name }} \
--push \
.

0 comments on commit fd10b7c

Please sign in to comment.