From a24420cfff01d86f399cb8688d382734eaf3dc61 Mon Sep 17 00:00:00 2001 From: Lucio Date: Thu, 16 Nov 2023 16:30:44 -0600 Subject: [PATCH] test8 --- .gitea/workflows/test-json.yaml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/test-json.yaml b/.gitea/workflows/test-json.yaml index f8c109f..806a5a4 100644 --- a/.gitea/workflows/test-json.yaml +++ b/.gitea/workflows/test-json.yaml @@ -18,8 +18,7 @@ jobs: uses: actions/checkout@v2 - name: Generate JSON - run: | - echo '{"key": "value"}' > data.json + run: echo '{"key": "value"}' > data.json - name: Display contents of directory run: ls @@ -29,3 +28,28 @@ jobs: 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 "@users.noreply.github.com" + git add downloaded-json/data.json + git commit -m "Add generated JSON" + git push +