From f3998fb2e4b8739a84bba1e9281d159b8ce20402 Mon Sep 17 00:00:00 2001 From: "avi@robusta.dev" Date: Sun, 28 Jul 2024 11:41:20 +0300 Subject: [PATCH] Create release_images.yaml --- .github/workflows/release_images.yaml | 56 +++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/release_images.yaml diff --git a/.github/workflows/release_images.yaml b/.github/workflows/release_images.yaml new file mode 100644 index 0000000..0511fa8 --- /dev/null +++ b/.github/workflows/release_images.yaml @@ -0,0 +1,56 @@ +name: Docker Build images on Tag + +on: + release: + types: [published] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up gcloud CLI + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + service_account_key: ${{ secrets.GCP_SA_KEY }} + project_id: genuine-flight-317411 + export_default_credentials: true + + # Configure Docker to use the gcloud command-line tool as a credential helper for authentication + - name: Configure Docker + run: |- + gcloud auth configure-docker us-central1-docker.pkg.dev + + - name: Verify gcloud configuration + run: |- + gcloud config get-value project + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Build and push Docker images + uses: docker/build-push-action@v2 + with: + file: dockerfile + context: . + platforms: linux/arm64,linux/amd64 + push: true + tags: us-central1-docker.pkg.dev/genuine-flight-317411/devel/debug-toolkit:${{ github.ref_name }} + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker images Dockerhub + uses: docker/build-push-action@v2 + with: + file: dockerfile + context: . + platforms: linux/arm64,linux/amd64 + push: true + tags: robustadev/debug-toolkit:${{ github.ref_name }} \ No newline at end of file