Skip to content

Housekeeping

Housekeeping #11

Workflow file for this run

name: Push to GCR GitHub Action
on:
push:
paths-ignore:
- "**.md"
branches:
- "main"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependecies
uses: VaultVulp/[email protected]
with:
command: install -d
- name: Execute pre-commit
uses: VaultVulp/[email protected]
with:
command: run pre-commit run -a --color=always --show-diff-on-failure
- name: Execute Unit Tests
uses: VaultVulp/[email protected]
with:
command: run make test
build-and-push-to-gcr:
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: google-github-actions/setup-gcloud@v2
- name: Push image with commit hash tag
uses: RafikFarhad/[email protected]
with:
gcloud_service_key: ${{ secrets.GCLOUD_SERVICE_KEY }}
registry: gcr.io
project_id: ${{ secrets.GCLOUD_PROJECT_ID }}
image_name: ${{ github.event.repository.name }}
image_tag: ${{ github.sha }}
dockerfile: ./Dockerfile
- name: Push image with latest tag
uses: RafikFarhad/[email protected]
with:
gcloud_service_key: ${{ secrets.GCLOUD_SERVICE_KEY }}
registry: gcr.io
project_id: ${{ secrets.GCLOUD_PROJECT_ID }}
image_name: ${{ github.event.repository.name }}
image_tag: latest
dockerfile: ./Dockerfile