Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Docker image repository URLs #506

Merged
merged 3 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading