This commit is contained in:
@@ -15,7 +15,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Generate JSON
|
- name: Generate JSON
|
||||||
run: |
|
run: |
|
||||||
@@ -25,32 +25,7 @@ jobs:
|
|||||||
run: ls
|
run: ls
|
||||||
|
|
||||||
- name: Upload JSON as artifact
|
- name: Upload JSON as artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: generated-json
|
name: generated-json
|
||||||
path: data.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
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user