ci: cache Go, switch to forgejo actions fully
All checks were successful
Test / elint (push) Successful in 1m9s

This commit is contained in:
Jared Allard 2025-03-09 17:01:41 -07:00
parent fd92273118
commit c3b6737318
Signed by: jaredallard
SSH key fingerprint: SHA256:wyRyyv28jBYw8Yp/oABNPUYvbGd6hyZj23XVXEm5G/U
2 changed files with 34 additions and 4 deletions

View file

@ -16,12 +16,27 @@ jobs:
elint: elint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: https://code.forgejo.org/actions/checkout@v4
- uses: jdx/mise-action@v2 - uses: https://git.rgst.io/rgst-io/mise-action@v2
with: with:
experimental: true experimental: true
github_token: ${{ secrets.ACTUAL_GITHUB_TOKEN }}
- name: Get Go directories
id: go
run: |
echo "cache_dir=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "mod_cache_dir=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
- uses: https://code.forgejo.org/actions/cache@v4
with:
path: ${{ steps.go.outputs.cache_dir }}
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }}
- uses: https://code.forgejo.org/actions/cache@v4
with:
path: ${{ steps.go.outputs.mod_cache_dir }}
key: ${{ runner.os }}-go-mod-cache-${{ hashFiles('go.sum') }}
- name: Setup Environment - name: Setup Environment
working-directory: .tools working-directory: .tools
run: mise run build run: mise run build
- name: Run linter - name: Run linter
run: mise run lint run: mise run lint

View file

@ -16,13 +16,28 @@ jobs:
permissions: permissions:
contents: write contents: write
steps: steps:
- uses: actions/checkout@v4 - uses: https://code.forgejo.org/actions/checkout@v4
- uses: jdx/mise-action@v2 - uses: https://git.rgst.io/rgst-io/mise-action@v2
with: with:
experimental: true experimental: true
github_token: ${{ secrets.ACTUAL_GITHUB_TOKEN }}
- name: Get Go directories
id: go
run: |
echo "cache_dir=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "mod_cache_dir=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
- uses: https://code.forgejo.org/actions/cache@v4
with:
path: ${{ steps.go.outputs.cache_dir }}
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }}
- uses: https://code.forgejo.org/actions/cache@v4
with:
path: ${{ steps.go.outputs.mod_cache_dir }}
key: ${{ runner.os }}-go-mod-cache-${{ hashFiles('go.sum') }}
- name: Setup Environment - name: Setup Environment
working-directory: .tools working-directory: .tools
run: mise run build run: mise run build
- name: Run updater - name: Run updater
env: env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}