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:
parent
378e1cb226
commit
73935b4123
1 changed files with 14 additions and 11 deletions
25
.github/workflows/deploy.yaml
vendored
25
.github/workflows/deploy.yaml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue