Replace setup-go with a custom action

To maximize the caching efficiency, all build jobs are executed as
forgejo user.
Hash is explicitly specified to avoid breaking changes.
This commit is contained in:
Otto Richter 2024-09-15 02:08:36 +02:00
parent 3a38dbac17
commit a56c000f60
2 changed files with 5 additions and 5 deletions

View file

@ -1,11 +1,11 @@
runs: runs:
using: "composite" using: "composite"
steps: steps:
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: setup user and permissions - name: setup user and permissions
run: | run: |
git config --add safe.directory '*' git config --add safe.directory '*'
adduser --quiet --comment forgejo --disabled-password forgejo adduser --quiet --comment forgejo --disabled-password forgejo
chown -R forgejo:forgejo . chown -R forgejo:forgejo .
- uses: https://codeberg.org/fnetx/setup-cache-go@b2214eaf6fb44c7e8512c0f462a2c3ec31f86a73
with:
username: forgejo

View file

@ -214,5 +214,5 @@ jobs:
steps: steps:
- uses: https://code.forgejo.org/actions/checkout@v3 - uses: https://code.forgejo.org/actions/checkout@v3
- uses: ./.forgejo/workflows/composite/setup-env - uses: ./.forgejo/workflows/composite/setup-env
- run: make deps-backend deps-tools - run: su forgejo -c 'make deps-backend deps-tools'
- run: make security-check - run: su forgejo -c 'make security-check'