Files
test-pipeline/.gitea/workflows/test-json.yaml
Lucio f46a0ab0ac
Some checks failed
Gitea Actions Demo / generate-json (push) Failing after 1m39s
Gitea Actions Demo / upload-to-repo (push) Failing after 27s
test9
2023-11-16 16:31:50 -06:00

57 lines
1.2 KiB
YAML

name: Gitea Actions Demo
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
jobs:
generate-json:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Generate JSON
run: |
echo '{"key": "value"}' > data.json
- name: Display contents of directory
run: ls
- name: Upload JSON as artifact
uses: actions/upload-artifact@v2
with:
name: generated-json
path: data.json
upload-to-repo:
runs-on: ubuntu-latest
needs: generate-json
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Download JSON artifact
uses: actions/download-artifact@v2
with:
name: generated-json
path: downloaded-json
- name: Display contents of downloaded directory
run: ls downloaded-json
- name: Commit changes and push back to repository
run: |
git config user.name "GitHub Actions"
git config user.email "<actions-bot>@users.noreply.github.com"
git add downloaded-json/data.json
git commit -m "Add generated JSON"
git push