Skip to content

release to GCR on push #8

release to GCR on push

release to GCR on push #8

Workflow file for this run

name: Build
on:
pull_request:
types:
- opened
- synchronize
push:
branches:
- fork
env:
REGISTRY: us-central1-docker.pkg.dev/main-383408/otterize
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
with:
driver-opts: network=host
- name: Login to GCR
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: _json_key_base64
password: ${{ secrets.B64_GCLOUD_SERVICE_ACCOUNT_JSON}}
- uses: actions/setup-go@v3
- name: Build release
run: make release
- uses: actions/upload-artifact@v4
if: github.event_name == 'push'
with:
name: release
path: build/bin/*
- name: Build artifacts as Docker image
if: github.event_name == 'push'
uses: docker/build-push-action@v2
with:
context: .
tags: ${{ env.REGISTRY }}/rolesanywhere-credential-helper:${{ github.sha }}
push: true
platforms: linux/amd64,linux/arm64