Deploy refs/heads/fix-cleaner #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
- name: Setup gcloud CLI | |
uses: google-github-actions/[email protected] | |
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/[email protected] | |
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" |