Skip to content

Update civo.yml

Update civo.yml #11

Workflow file for this run

name: Release Civo Image
on:
push:
tags:
- '*'
jobs:
build:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '>=1.20.0'
- name: Build binary
run: |
cd cluster-autoscaler && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o cluster-autoscaler-amd64
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build and push (docker)
uses: docker/build-push-action@v2
with:
context: cluster-autoscaler
file: Dockerfile.amd64
push: true
build-args: |
VERSION=${{ steps.tag.outputs.tag }}
tags: |
civo/cluster-autoscaler:${{ steps.tag.outputs.tag }}
civo/cluster-autoscaler:latest
- name: Build and push (Google Container Registry)
uses: RafikFarhad/push-to-gcr-github-action@v5-beta
with:
gcloud_service_key: ${{ secrets.GCLOUD_SERVICE_KEY }}
registry: gcr.io
project_id: consummate-yew-302509
image_name: cluster-autoscaler
image_tag: latest,${{ steps.tag.outputs.tag }}