From 4b37cce7647001fb625646209c3664212b4b29cf Mon Sep 17 00:00:00 2001 From: Mikhail Nacharov Date: Tue, 25 Jun 2024 14:30:26 +0400 Subject: [PATCH] ci(EI-540): build and push --- .github/workflows/build.yaml | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..5322595 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,44 @@ +name: Build and Deploy + +on: + workflow_dispatch: + push: + branches: + - main + - EI-540 + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4 + + - uses: 'google-github-actions/auth@v2' + with: + project_id: iaas-383414 + workload_identity_provider: projects/802839937832/locations/global/workloadIdentityPools/iaas-pipelines-iaas/providers/github-p2p-org-repos + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: europe-west4-docker.pkg.dev/iaas-383414/p2p-ssv-cluster-manager/main + tags: | + type=sha,priority=300 + + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@v2 + + - name: Configure Docker to use the gcloud command-line tool as a credential helper + run: gcloud auth configure-docker europe-west4-docker.pkg.dev --quiet + + - name: Build & Push + uses: docker/build-push-action@v5 + with: + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}