Skip to content

Commit

Permalink
Update Docker image repository URLs (#506)
Browse files Browse the repository at this point in the history
* Update Docker image repository URLs in values.yaml

* Update workflows

* Updating tag

---------

Co-authored-by: ausias-armesto <[email protected]>
  • Loading branch information
jeandemeusy and ausias-armesto authored May 3, 2024
1 parent fa0a481 commit fdd223c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 26 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/gcp-tag-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,30 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Google Cloud credentials_json
- name: Set up Google Cloud Credentials
id: auth
uses: google-github-actions/auth@v1
uses: google-github-actions/auth@v2
with:
token_format: "access_token"
credentials_json: ${{ secrets.GOOGLE_CTDAPP_SERVICE_ACCOUNT_CREDENTIALS }}
credentials_json: ${{ secrets.GOOGLE_HOPRASSOCIATION_CREDENTIALS_REGISTRY }}

- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
uses: google-github-actions/setup-gcloud@v2
with:
project_id: ${{ secrets.GOOGLE_PROJECT }}
project_id: hoprassociation
install_components: beta

- name: Login Google Container Registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.GOOGLE_REGION }}-docker.pkg.dev
registry: europe-west3-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}


- name: Apply tag to GCP artifact
run: |
docker_registry=${{ secrets.GOOGLE_REGION }}-docker.pkg.dev
image=${{ secrets.GOOGLE_PROJECT }}/${{ secrets.GOOGLE_REPOSITORY }}/cover-traffic
docker_registry=europe-west3-docker.pkg.dev
image=hoprassociation/docker-images/cover-traffic
commit_tag=$(git rev-parse --short "$GITHUB_SHA")
tag=${{ github.ref_name }}
Expand Down
36 changes: 23 additions & 13 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,29 @@ jobs:
shell: sh
run: echo "SHORT_SHA=`echo ${{ github.event.pull_request.head.sha }} | cut -c1-7`" >> $GITHUB_ENV

- name: Login to GCP
id: gcloud
uses: elgohr/gcloud-login-action@v1 #TODO - v2 is bugged, unable to get outputs
- name: Set up Google Cloud Credentials
id: auth
uses: google-github-actions/auth@v2
with:
account_key: ${{ secrets.GOOGLE_CREDENTIALS }}
token_format: "access_token"
credentials_json: ${{ secrets.GOOGLE_HOPRASSOCIATION_CREDENTIALS_REGISTRY }}

- name: Build and push container image
uses: elgohr/Publish-Docker-Github-Action@v5
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
workdir: "ct-app"
dockerfile: "./Dockerfile"
name: ${{ secrets.GOOGLE_PROJECT }}/${{ secrets.GOOGLE_REPOSITORY }}/cover-traffic
registry: ${{ secrets.GOOGLE_REGION }}-docker.pkg.dev
username: ${{ steps.gcloud.outputs.username }}
password: ${{ steps.gcloud.outputs.password }}
tags: "${{ env.SHORT_SHA }}"
project_id: hoprassociation
install_components: beta

- name: Login Google Container Registry
uses: docker/login-action@v3
with:
registry: europe-west3-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}

- name: Build container image
uses: docker/build-push-action@v5
with:
push: true
context: ct-app
tags: europe-west3-docker.pkg.dev/hoprassociation/docker-images/cover-traffic:${{ env.SHORT_SHA }}
8 changes: 4 additions & 4 deletions helm/ctdapp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ ctdapp:

image:
core:
repository: europe-west6-docker.pkg.dev/ctdapp-391309/ctdapp/cover-traffic
repository: europe-west3-docker.pkg.dev/hoprassociation/docker-images/cover-traffic
pullPolicy: Always
tag: ba586d0
tag: f65697a
postman:
repository: europe-west6-docker.pkg.dev/ctdapp-391309/ctdapp/cover-traffic
repository: europe-west3-docker.pkg.dev/hoprassociation/docker-images/cover-traffic
pullPolicy: Always
tag: ba586d0
tag: f65697a

nameOverride: ""
fullnameOverride: ""
Expand Down

0 comments on commit fdd223c

Please sign in to comment.