Skip to content

Commit

Permalink
merge steps
Browse files Browse the repository at this point in the history
  • Loading branch information
ianrose14 committed Nov 10, 2023
1 parent 1b4c48f commit cd34b52
Showing 1 changed file with 16 additions and 22 deletions.
38 changes: 16 additions & 22 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
[push]

jobs:
build:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -23,24 +23,18 @@ jobs:
- name: Test
run: go test ./...

push:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4

- name: Setup
run: mkdir -p bin/linux && cp bin/webapp bib/linux_amd64/webapp

- 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: gcr.io
project_id: ian-rose
image_name: us-central1-docker.pkg.dev/ian-rose/docker-1/webapp
image_tag: latest,${{ steps.vars.outputs.sha_short }}
- name: Setup
run: mkdir -p bin/linux && cp bin/webapp bib/linux_amd64/webapp

- 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: gcr.io
project_id: ian-rose
image_name: us-central1-docker.pkg.dev/ian-rose/docker-1/webapp
image_tag: latest,${{ steps.vars.outputs.sha_short }}

0 comments on commit cd34b52

Please sign in to comment.