mirror of
https://github.com/cisagov/log4j-affected-db.git
synced 2024-11-23 00:50:48 +00:00
Move go installation so that it takes place before the cache task
Some variables defined in the go installation are used in the cache task, so the go installation must happen first. Co-authored-by: Nick M. <50747025+mcdonnnj@users.noreply.github.com>
This commit is contained in:
parent
181d1b2faf
commit
bb6e566e3a
1 changed files with 14 additions and 12 deletions
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
|
@ -23,6 +23,20 @@ jobs:
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.9
|
||||||
|
# GO_VERSION and GOCACHE are used by the cache task, so the go
|
||||||
|
# installation must happen before that.
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '1.16'
|
||||||
|
- name: Store installed Go version
|
||||||
|
run: |
|
||||||
|
echo "GO_VERSION="\
|
||||||
|
"$(go version | sed 's/^go version go\([0-9.]\+\) .*/\1/')" \
|
||||||
|
>> $GITHUB_ENV
|
||||||
|
- name: Lookup go cache directory
|
||||||
|
id: go-cache
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=dir::$(go env GOCACHE)"
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
|
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
|
||||||
|
@ -48,18 +62,6 @@ jobs:
|
||||||
${{ hashFiles('**/.pre-commit-config.yaml') }}"
|
${{ hashFiles('**/.pre-commit-config.yaml') }}"
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ env.BASE_CACHE_KEY }}
|
${{ env.BASE_CACHE_KEY }}
|
||||||
- uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: '1.16'
|
|
||||||
- name: Store installed Go version
|
|
||||||
run: |
|
|
||||||
echo "GO_VERSION="\
|
|
||||||
"$(go version | sed 's/^go version go\([0-9.]\+\) .*/\1/')" \
|
|
||||||
>> $GITHUB_ENV
|
|
||||||
- name: Lookup go cache directory
|
|
||||||
id: go-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=dir::$(go env GOCACHE)"
|
|
||||||
- name: Setup curl cache
|
- name: Setup curl cache
|
||||||
run: mkdir -p ${{ env.CURL_CACHE_DIR }}
|
run: mkdir -p ${{ env.CURL_CACHE_DIR }}
|
||||||
- name: Install Packer
|
- name: Install Packer
|
||||||
|
|
Loading…
Reference in a new issue