From a217c9d11eae6a303d20099f7db7476880f2e4ef Mon Sep 17 00:00:00 2001 From: Rado Date: Mon, 24 Jun 2024 13:02:43 +0300 Subject: [PATCH] ci: upload stable.json to S3 on PR merge Signed-off-by: Rado --- .github/workflows/upload-stable-json.yml | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/upload-stable-json.yml diff --git a/.github/workflows/upload-stable-json.yml b/.github/workflows/upload-stable-json.yml new file mode 100644 index 00000000..4f234cf3 --- /dev/null +++ b/.github/workflows/upload-stable-json.yml @@ -0,0 +1,26 @@ +name: Upload stable.json to S3 + +on: + pull_request: + types: + - closed + branches: + - master + paths: + - 'downloads/v1/versions/stable.json' + +jobs: + upload: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + + - name: Upload stable.json to S3 + uses: prewk/s3-cp-action@v2 + with: + aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws_region: eu-west-1 + source: './downloads/v1/versions/stable.json' + dest: 's3://releases.dhis2.org/v1/versions/stable.json'