From bdd237b9716e500019472da420dde983db665b2d Mon Sep 17 00:00:00 2001 From: Darius Rapalis Date: Sun, 16 Mar 2025 14:41:49 +0200 Subject: [PATCH] image push test --- .github/workflows/cd.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index e35ff9b..450019b 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -6,10 +6,27 @@ on: jobs: deploy: + permissions: + contents: 'read' + id-token: 'write' + name: Deploy runs-on: ubuntu-latest steps: + - id: 'auth' + uses: 'google-github-actions/auth@v2' + with: + credentials_json: '${{ secrets.GCP_CREDENTIALS }}' + + - name: 'Set up Cloud SDK' + uses: 'google-github-actions/setup-gcloud@v2' + with: + version: '>= 363.0.0' + + - name: 'Use gcloud CLI' + run: 'gcloud info' + - name: Check out code uses: actions/checkout@v4 @@ -19,4 +36,7 @@ jobs: go-version: "1.23.0" - name: Build - run: scripts/buildprod.sh \ No newline at end of file + run: scripts/buildprod.sh + + - name: Push to Google + run: gcloud builds submit --tag us-central1-docker.pkg.dev/notely-453912/notely-ar-repo/notely:latest . \ No newline at end of file