ente/.github/workflows/server-lint.yml
Manav Rathi fa3f249a7a
[meta] Omit unnecessary reruns of workflows when deploying
When we merge main into a deploy/* branch
(e.g. https://github.com/ente-io/ente/pull/1147), all changes get pulled in not
just the one related to that deployment, and this causes almost all of the path
based workflows to run again unnecessarily. Exclude the various "deploy/**"
branches to stop these unnecessary workflows from being triggered.
2024-03-19 12:59:04 +05:30

31 lines
815 B
YAML

name: "Lint (server)"
on:
# Run on every push to a branch other than main that changes server/
push:
branches-ignore: [main, "deploy/**"]
paths:
- "server/**"
- ".github/workflows/server-lint.yml"
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: server
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: "server/go.mod"
cache: true
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libsodium-dev
- name: Lint
run: "./scripts/lint.sh"