Skip to content

Commit

Permalink
Use Docker actions for login, build, push
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Furseth committed Jan 17, 2024
1 parent 871db97 commit 2ee41f5
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,19 @@ jobs:
# Auth Docker to access the artifact registry
- name: "Docker auth"
run: |-
gcloud auth configure-docker europe-docker.pkg.dev --quiet
gcloud auth configure-docker europe-north1-docker.pkg.dev --quiet
- name: Build image
run: docker image build -t kv-ros-backend .
working-directory: ../../
- name: Login to GAR
uses: docker/login-action@v3
with:
registry: europe-north1.pkg.dev/spire-ros-5lmr
username: _json_key
password: ${{ secrets.GCS_ACC_KEY_JSON }}

- name: Push image
run: docker push europe-docker.pkg.dev/spire-ros-5lmr/eu.gcr.io
- name: Push to Google Artifact Registry
uses: docker/build-push-action@v2
with:
push: true
tags: |
europe-north1.pkg.dev/spire-ros-5lmr/kv-ros/backend:latest

0 comments on commit 2ee41f5

Please sign in to comment.