Skip to content

Commit

Permalink
Test caching for tools
Browse files Browse the repository at this point in the history
  • Loading branch information
BelleNottelling committed Dec 5, 2023
1 parent e57ea84 commit cd375e7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,36 @@ on:
jobs:
build-tools:
runs-on: ubuntu-latest
env:
GO_VERSION: '1.21.4'
MMDBMELD_TAG: 'v0.1.1'
steps:
- name: Check for Cached Tools Build
uses: actions/cache@v3
id: tools-cache
with:
path: ./tools
key: $GO_VERSION + $MMDBMELD_TAG

- name: Set up Go
uses: actions/setup-go@v4
if: steps.tools-cache.outputs.cache-hit != 'true'
with:
go-version: '1.21.4'

- name: Clone mmdbmeld
if: steps.tools-cache.outputs.cache-hit != 'true'
run: git clone -b v0.1.1 https://github.com/safing/mmdbmeld.git

- name: Build mmdbmeld
if: steps.tools-cache.outputs.cache-hit != 'true'
working-directory: ./mmdbmeld
run: |
go build -C cmd/mmdbmeld
go build -C cmd/mmdbcheck
- name: Move the Tools
if: steps.tools-cache.outputs.cache-hit != 'true'
run: |
mkdir ./tools
cp ./mmdbmeld/cmd/mmdbmeld/mmdbmeld ./mmdbmeld/cmd/mmdbcheck/mmdbcheck ./tools
Expand Down

0 comments on commit cd375e7

Please sign in to comment.