From 96faf1fefd5b366e4a4deb164e16f0aee1ab988d Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 13 Jun 2024 11:41:05 +0200 Subject: [PATCH] chore: Update Docker image tag and file path in deploy-golang-develop.yml --- .github/workflows/deploy-golang-develop.yml | 38 ++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-golang-develop.yml b/.github/workflows/deploy-golang-develop.yml index 570b2b6e..8f0bc04f 100644 --- a/.github/workflows/deploy-golang-develop.yml +++ b/.github/workflows/deploy-golang-develop.yml @@ -20,9 +20,45 @@ defaults: working-directory: occupi-backend jobs: - deploy: + build-push-docker: + name: Build and Push Develop Docker Image + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Decrypt env variables + run: | + echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --quiet --batch --yes --decrypt --passphrase-fd 0 .dev.env.gpg > .dev.env + + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: occupi-backend + file: occupi-backend/Dockerfile.dev + platforms: linux/amd64,linux/arm64 + push: true + no-cache: true + tags: ${{ secrets.DOCKER_USERNAME }}/occupi-backend:latest-develop + + deploy: name: Deploy for Develop runs-on: ubuntu-latest + needs: build-push-docker steps: - name: Checkout code