Skip to content

Commit

Permalink
ci: fix codecov job depedency
Browse files Browse the repository at this point in the history
Signed-off-by: Massimiliano Giovagnoli <[email protected]>
  • Loading branch information
maxgio92 committed Feb 8, 2024
1 parent 436aab9 commit 99e5322
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/actions/exists/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Checks if an input is defined

description: Checks if an input is defined and outputs 'true' or 'false'.

inputs:
value:
description: value to test
required: true

outputs:
result:
description: outputs 'true' or 'false' if input value is defined or not
value: ${{ steps.check.outputs.result }}

runs:
using: composite
steps:
- shell: bash
id: check
run: |
echo "result=${{ inputs.value != '' }}" >> $GITHUB_OUTPUT
20 changes: 20 additions & 0 deletions .github/actions/setup-caches/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Setup caches

description: Setup caches for go modules and build cache.

inputs:
build-cache-key:
description: build cache prefix

runs:
using: composite
steps:
- uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # v3.2.2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('**/go.sum') }}-${{ hashFiles('Makefile') }}
- uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # v3.2.2
if: ${{ inputs.build-cache-key }}
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-build-cache-${{ inputs.build-cache-key }}-${{ hashFiles('**/go.sum') }}-${{ hashFiles('Makefile') }}

0 comments on commit 99e5322

Please sign in to comment.