-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
The Problem
Given the following Github Actions YAML Workflow
---
name: Sync - ACLs
on:
push:
branches:
- main
pull_request:
branches:
- '*'
jobs:
sync-acls:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test ACLs
uses: tailscale/gitops-acl-action@v1
with:
api-key: ${{ secrets.TS_API_KEY }}
tailnet: ${{ secrets.TS_TAILNET }}
policy-file: "policy.hujson"
action: testI'm getting the following warning message during the Github Actions run output
Run tailscale/gitops-acl-action@v1
Run actions/[email protected]
Setup go version spec 1.21.6
[...]
Warning: Restore cache failed: Dependencies file is not found in /home/runner/work/tailscale-acls/tailscale-acls. Supported file pattern: go.sum
The Explanation
It looks like because there isn't a go.sum file, the default behavior for actions/[email protected] is to use caching.
From https://github.com/actions/setup-go/tree/v4.0.0?tab=readme-ov-file#v4
The V4 edition of the action offers:
- Enabled caching by default
The action will try to enable caching unless the cache input is explicitly set to false.
The Fix
As discussed in actions/setup-go#427 (comment), the following change can be made to actions/[email protected] so that the warning message goes away
- name: Setup go
uses: actions/[email protected]
with:
cache: falsebart-braidwell, BCNelson and cbrookins
Metadata
Metadata
Assignees
Labels
No labels