Skip to content

Deploy refs/heads/k8s-cleaner #3

Deploy refs/heads/k8s-cleaner

Deploy refs/heads/k8s-cleaner #3

Workflow file for this run

name: K8S Cleaner
run-name: Deploy ${{github.ref}}
on:
workflow_dispatch: {}
env:
PROJECT_ID: "parity-zombienet"
GCR_REGISTRY: "europe-west3-docker.pkg.dev"
GCR_REPOSITORY: "zombienet-images"
GKE_NAMESPACE: "k8s-cleaner"
GKE_CRONJOB: "k8s-cleaner"
GKE_CONTAINER: "k8s-cleaner"
GKE_CLUSTER: "parity-zombienet"
GKE_ZONE: "europe-west3-b"
jobs:
build_and_push:
defaults:
run:
working-directory: ./crates/k8s-cleaner
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup gcloud CLI
uses: google-github-actions/setup-gcloud@v1.1.1
with:
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ env.PROJECT_ID }}
export_default_credentials: true
- name: Login to GCP
uses: google-github-actions/auth@v1.1.1
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Artifact registry authentication
run: |
gcloud auth configure-docker ${{ env.GCR_REGISTRY }}
- name: Build, tag, and push image to GCP Artifact registry
id: build-image
env:
IMAGE: ${{ env.GKE_CRONJOB }}:${{ github.sha }}
run: |
docker build \
-t $GCR_REGISTRY/$PROJECT_ID/$GCR_REPOSITORY/$IMAGE \
-f Dockerfile \
.
docker push $GCR_REGISTRY/$PROJECT_ID/$GCR_REPOSITORY/$IMAGE
echo "::set-output name=image::$GCR_REGISTRY/$PROJECT_ID/$GCR_REPOSITORY/$IMAGE"