Skip to content

Merge pull request #8 from husni-zuhdi/get-blog-from-husni-blog-resou… #6

Merge pull request #8 from husni-zuhdi/get-blog-from-husni-blog-resou…

Merge pull request #8 from husni-zuhdi/get-blog-from-husni-blog-resou… #6

Workflow file for this run

name: Rust Build and Push
on:
push:
tags:
- "*"
jobs:
build_push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Setup Environment Variables
run: |-
echo "VERSION=${{ github.ref_name }}" >> "$GITHUB_ENV"
- name: Checkout Code
uses: actions/checkout@v4
- name: Login to GCR
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.SERVICE_ACCOUNT_KEY }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
export_default_credentials: true
- name: Build Docker Image
run: |-
docker build -t husni-portfolio:$VERSION -f ./Dockerfile .
- name: Configure Docker Client
run: gcloud auth configure-docker --quiet
- name: Push Docker Image to Google Container/Artifact Registry
run: |-
docker tag husni-portfolio:$VERSION gcr.io/$GCP_PROJECT/husni-portfolio:$VERSION
docker push gcr.io/$GCP_PROJECT/husni-portfolio:$VERSION