Add .gitea/workflows/test.yaml
All checks were successful
/ test-on-protected-branch (push) Successful in 20s
All checks were successful
/ test-on-protected-branch (push) Successful in 20s
This commit is contained in:
parent
713ea9b925
commit
92e766d4b0
29
.gitea/workflows/test.yaml
Normal file
29
.gitea/workflows/test.yaml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-on-protected-branch:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Fix dns
|
||||||
|
run: echo 'nameserver 1.1.1.1' > /etc/resolv.conf
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.ACTION_TOKEN }}
|
||||||
|
- name: Add a line to README.md
|
||||||
|
run: |
|
||||||
|
echo -e "$(date) - commited via Gitea Actions\n" >> README.md
|
||||||
|
- name: Get last commit message
|
||||||
|
id: last-commit
|
||||||
|
run: |
|
||||||
|
echo "author=$(git log -1 --pretty=\"%an <%ae>\")" >> $GITHUB_OUTPUT
|
||||||
|
- name: Commit changes back
|
||||||
|
uses: https://github.com/stefanzweifel/git-auto-commit-action@v5
|
||||||
|
with:
|
||||||
|
commit_user_name: eliroca
|
||||||
|
commit_author: ${{ steps.last-commit.outputs.author }}
|
||||||
|
commit_message: "[skip actions] Gitea Actions run"
|
||||||
|
commit_options: '--no-edit'
|
||||||
|
skip_fetch: true
|
Loading…
x
Reference in New Issue
Block a user