mirror of
https://github.com/lukaszraczylo/lolcathost.git
synced 2026-07-01 03:35:18 +00:00
Move to shared workflows.
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
name: AutoUpdate
|
name: Autoupdate go.mod and go.sum
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 3 * * *"
|
- cron: "0 3 * * *"
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -11,45 +11,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
autoupdate:
|
autoupdate:
|
||||||
name: Update dependencies and test
|
uses: lukaszraczylo/shared-actions/.github/workflows/go-autoupdate.yaml@main
|
||||||
runs-on: ubuntu-latest
|
with:
|
||||||
|
go-version: "1.24"
|
||||||
steps:
|
release-workflow: "release.yml"
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Go
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: "1.24"
|
|
||||||
cache: true
|
|
||||||
|
|
||||||
- name: Update dependencies
|
|
||||||
run: |
|
|
||||||
go get -u ./...
|
|
||||||
go mod tidy
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: go test -race -cover ./...
|
|
||||||
|
|
||||||
- name: Commit changes
|
|
||||||
id: auto-commit
|
|
||||||
uses: stefanzweifel/git-auto-commit-action@v5
|
|
||||||
with:
|
|
||||||
commit_message: "Update go.mod and go.sum"
|
|
||||||
file_pattern: "go.mod go.sum"
|
|
||||||
|
|
||||||
- name: Trigger release workflow
|
|
||||||
if: steps.auto-commit.outputs.changes_detected == 'true'
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
script: |
|
|
||||||
await github.rest.actions.createWorkflowDispatch({
|
|
||||||
owner: 'lukaszraczylo',
|
|
||||||
repo: 'lolcathost',
|
|
||||||
workflow_id: 'release.yml',
|
|
||||||
ref: 'main'
|
|
||||||
})
|
|
||||||
|
|||||||
Reference in New Issue
Block a user