-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 988 Bytes
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
[push]
jobs:
build-and-push:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.18'
- name: Build
run: make build
- name: what gblic?
run: ldd --version ldd
- name: Test
run: go test ./...
- name: Get shortsha
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Push to GCR
uses: RafikFarhad/[email protected]
with:
gcloud_service_key: ${{ secrets.GCP_SERVICE_ACCOUNT }}
registry: us-central1-docker.pkg.dev
project_id: ian-rose/docker-1
image_name: webapp
image_tag: latest,${{ steps.vars.outputs.sha_short }}
build_args: BIN=bin/webapp