diff --git a/.github/workflows/cd-build.yaml b/.github/workflows/cd-build.yaml index 01593128..d59b8852 100644 --- a/.github/workflows/cd-build.yaml +++ b/.github/workflows/cd-build.yaml @@ -10,33 +10,21 @@ on: jobs: push-backend: name: Build backend - runs-on: ubuntu-latest - outputs: - version: ${{ steps.build.outputs.tag }} - steps: - - uses: actions/checkout@v4 - - uses: ./actions/build-push-gcloud - id: build - with: - google_key: ${{ secrets.GCLOUD_SECRET_KEY }} - repo: services/whisper-notes-backend - dockerfile: backend.Dockerfile - registry: europe-north1-docker.pkg.dev - project_id: ${{ secrets.GCLOUD_PROJECT }} - secrets: inherit + uses: ./actions/build-push-gcloud/action.yaml@main + with: + google_key: ${{ secrets.GCLOUD_SECRET_KEY }} + repo: services/whisper-notes-backend + dockerfile: backend.Dockerfile + registry: europe-north1-docker.pkg.dev + project_id: ${{ secrets.GCLOUD_PROJECT }} + secrets: inherit push-frontend: name: Build frontend - runs-on: ubuntu-latest - outputs: - version: ${{ steps.build.outputs.tag }} - steps: - - uses: actions/checkout@v4 - - uses: ./actions/build-push-gcloud - id: build - with: - google_key: ${{ secrets.GCLOUD_SECRET_KEY }} - repo: services/whisper-notes-frontend - dockerfile: frontend.Dockerfile - registry: europe-north1-docker.pkg.dev - project_id: ${{ secrets.GCLOUD_PROJECT }} - secrets: inherit + uses: ./actions/build-push-gcloud/action.yaml@main + with: + google_key: ${{ secrets.GCLOUD_SECRET_KEY }} + repo: services/whisper-notes-frontend + dockerfile: frontend.Dockerfile + registry: europe-north1-docker.pkg.dev + project_id: ${{ secrets.GCLOUD_PROJECT }} + secrets: inherit diff --git a/actions/build-push-gcloud/action.yaml b/actions/build-push-gcloud/action.yaml index 02318926..34a5e6dd 100644 --- a/actions/build-push-gcloud/action.yaml +++ b/actions/build-push-gcloud/action.yaml @@ -43,6 +43,7 @@ jobs: description: "Image tag" value: ${{ steps.vars.outputs.branch }}-${{ steps.vars.outputs.sha_short }} steps: + - uses: actions/checkout@v4 - name: Docker login to Google Cloud id: vars run: |