Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor deploy and dockerize only on tag release #747

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .github/workflows/website_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ env:
jobs:
build:
runs-on: ubuntu-latest
outputs:
image: ${{ steps.output-image.outputs.image }}
name: 🔧Build
steps:
- name: Checkout Code
Expand All @@ -39,18 +37,15 @@ jobs:
run: |
docker pull ${{ env.WEBSITE_REGISTRY }}/gofr-dev/website:latest

- name: Build and Push Image Stage
- name: Build Image
uses: docker/build-push-action@v4
with:
push: false
context: ./
file: ./docs/Dockerfile
tags: us-central1-docker.pkg.dev/${{ env.GAR_PROJECT }}/${{ env.GAR_REGISTRY }}/${{ env.APP_NAME }}:${{ github.sha }}

- id: output-image
run: echo "image=`echo us-central1-docker.pkg.dev/${{ env.GAR_PROJECT }}/${{ env.GAR_REGISTRY }}/${{ env.APP_NAME }}:${{ github.sha }}`" >> "$GITHUB_OUTPUT"

dockerize:
if: ${{ startsWith(github.ref, 'refs/tags/v')}}
runs-on: ubuntu-latest
outputs:
image: ${{ steps.output-image.outputs.image }}
Expand Down Expand Up @@ -95,7 +90,6 @@ jobs:
deployment:
runs-on: ubuntu-latest
name: 🚀 Deploy
if: ${{ startsWith(github.ref, 'refs/tags/v')}}
needs: dockerize
container:
image: ghcr.io/zopsmart/gha-images:deployments-0.1.3
Expand Down
Loading