Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions cleanups #24620

Merged
merged 15 commits into from
May 12, 2023
Merged
17 changes: 8 additions & 9 deletions .github/workflows/cron-licenses.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
name: "Cron: Update licenses and gitignores"
name: cron-licenses

on:
schedule:
# weekly on Monday at 0:07 UTC
- cron: "7 0 * * 1"
- cron: "7 0 * * 1" # every Monday at 00:07 UTC

jobs:
cron:
cron-licenses:
if: github.repository == "go-gitea/gitea"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '>=1.20.1'
- name: update licenses and gitignores
run: timeout -s ABRT 40m make generate-license generate-gitignore
go-version: ">=1.20.1"
- run: make generate-license generate-gitignore
timeout-minutes: 40
- name: push translations to repo
uses: appleboy/git-push-action@v0.0.2
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: 'Lock Threads'
name: cron-lock

on:
schedule:
- cron: '0 0 * * *' # Run once a day
- cron: "0 0 * * *" # every day at 00:00 UTC
workflow_dispatch:

permissions:
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/cron-translations.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: "Cron: Pull translations from Crowdin"
name: cron-translations

on:
schedule:
- cron: "7 0 * * *" # every day at 0:07 UTC
- cron: "7 0 * * *" # every day at 00:07 UTC

jobs:
crowdin_pull:
crowdin-pull:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3
- name: download from crowdin
uses: docker://jonasfranz/crowdin
env:
Expand All @@ -30,11 +29,10 @@ jobs:
commit_message: "[skip ci] Updated translations via Crowdin"
remote: "git@github.com:go-gitea/gitea.git"
ssh_key: ${{ secrets.DEPLOY_KEY }}
crowdin_push:
crowdin-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3
- name: push translations to crowdin
uses: docker://jonasfranz/crowdin
env:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Docs: Publish"
name: publish-docs

on:
push:
Expand All @@ -11,12 +11,10 @@ jobs:
compliance-docs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup go
uses: actions/setup-go@v4
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.20.1'
go-version: ">=1.20.1"
- name: build docs
run: |
cd docs
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/pull-compliance-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: compliance-docs

on:
pull_request:
paths:
- "docs/**"
- "*.md"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
compliance-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- run: make deps-frontend
- run: make lint-md
119 changes: 38 additions & 81 deletions .github/workflows/pull-compliance.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Pull: Compliance Tests"
name: compliance

on: [pull_request]

Expand All @@ -7,136 +7,93 @@ concurrency:
cancel-in-progress: true

jobs:
lint_basic:
lint-backend:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup go
uses: actions/setup-go@v4
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.20'
go-version: ">=1.20"
check-latest: true
- name: deps-backend
run: make deps-backend deps-tools
- name: lint backend
run: make lint-backend
- run: make deps-backend deps-tools
- run: make lint-backend
env:
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
GOSUMDB: sum.golang.org
TAGS: bindata sqlite sqlite_unlock_notify
lint_windows:
lint-go-windows:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup go
uses: actions/setup-go@v4
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.20'
go-version: ">=1.20"
check-latest: true
- name: deps-backend
run: make deps-backend deps-tools
- name: lint-backend-windows
run: make lint-go-windows lint-go-vet
- run: make deps-backend deps-tools
- run: make lint-go-windows lint-go-vet
env:
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
GOSUMDB: sum.golang.org
TAGS: bindata sqlite sqlite_unlock_notify
GOOS: windows
GOARCH: amd64
lint_gogit:
lint-go-gogit:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup go
uses: actions/setup-go@v4
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.20'
go-version: ">=1.20"
check-latest: true
- name: deps-backend
run: make deps-backend deps-tools
- name: lint-backend-gogit
run: make lint-backend
- run: make deps-backend deps-tools
- run: make lint-go
env:
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
GOSUMDB: sum.golang.org
TAGS: bindata gogit sqlite sqlite_unlock_notify
- name: checks backend
run: make --always-make checks-backend # ensure the 'go-licenses' make target runs
silverwind marked this conversation as resolved.
Show resolved Hide resolved
check_backend:
checks-backend:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup go
uses: actions/setup-go@v4
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.20'
go-version: ">=1.20"
check-latest: true
- name: deps-backend
run: make deps-backend deps-tools
- name: checks backend
run: make --always-make checks-backend # ensure the 'go-licenses' make target runs
- run: make deps-backend deps-tools
- run: make --always-make checks-backend # ensure the "go-licenses" make target runs
frontend:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: deps-frontend
run: make deps-frontend
- name: lint frontend
run: make lint-frontend
- name: checks frontend
run: make checks-frontend
- name: test frontend
run: make test-frontend
- run: make deps-frontend
- run: make lint-frontend
- run: make checks-frontend
backend:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup go
uses: actions/setup-go@v4
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.20'
go-version: ">=1.20"
check-latest: true
- name: setup node
uses: actions/setup-node@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: deps-backend
run: make deps-backend deps-tools
- name: deps-frontend
run: make deps-frontend
- name: build frontend
run: make frontend
- name: build-backend-no-gcc
run: go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
env:
GOPROXY: https://goproxy.io
- run: make deps-backend deps-tools
- run: make deps-frontend
- run: make frontend
- run: go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
- name: build-backend-arm64
run: make backend # test cross compile
env:
GOPROXY: https://goproxy.io
GOOS: linux
GOARCH: arm64
TAGS: bindata gogit
- name: build-backend-windows
run: go build -o gitea_windows
env:
GOPROXY: https://goproxy.io
GOOS: windows
GOARCH: amd64
TAGS: bindata gogit
- name: build-backend-386
run: go build -o gitea_linux_386 # test if compatible with 32 bit
env:
GOPROXY: https://goproxy.io
GOOS: linux
GOARCH: 386
26 changes: 0 additions & 26 deletions .github/workflows/pull-compliance_docs.yml

This file was deleted.

Loading