1
0
Fork 0
mirror of https://github.com/imjasonh/kontain.me synced 2026-07-18 14:47:48 +00:00

reorganize steps to checkout as late as possible

This commit is contained in:
Jason Hall 2021-12-08 09:00:58 -05:00
parent 378e1cb226
commit 73935b4123

View file

@ -15,19 +15,10 @@ jobs:
id-token: write
contents: read
steps:
- uses: actions/checkout@v2
# Install tools.
- uses: actions/setup-go@v2
with:
go-version: 1.17.x
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/ko
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: imjasonh/setup-ko@v0.4
env:
KO_DOCKER_REPO: gcr.io/kontaindotme
@ -50,7 +41,19 @@ jobs:
gcloud auth login --brief --cred-file="${{ steps.auth.outputs.credentials_file_path }}"
gcloud auth print-access-token | ko login gcr.io --username=oauth2accesstoken --password-stdin
# Deploy and test
# Checkout code.
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/ko
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# Deploy and test.
- run: ./deploy.sh
env:
KOCACHE: ~/ko