From e8a9397eb56683b13ba23abf7ba34fbf65d0b95c Mon Sep 17 00:00:00 2001 From: Zach Smith Date: Fri, 28 May 2021 15:38:20 +0200 Subject: [PATCH] Split release workflow --- .github/workflows/stable-deploy.yml | 26 +++++++++++++++++++ .../{stable.yml => stable-release.yml} | 15 +++-------- 2 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/stable-deploy.yml rename .github/workflows/{stable.yml => stable-release.yml} (69%) diff --git a/.github/workflows/stable-deploy.yml b/.github/workflows/stable-deploy.yml new file mode 100644 index 0000000..63b99f2 --- /dev/null +++ b/.github/workflows/stable-deploy.yml @@ -0,0 +1,26 @@ +name: deployment@stable + +on: + push: + branches: + - stable + +jobs: + + source-code: + runs-on: nccrd.saeon.ac.za + steps: + - uses: actions/checkout@v2 + with: + ref: stable + + deploy: + needs: [source-code] + runs-on: nccrd.saeon.ac.za + steps: + - name: Deploy services + run: >- + NCCRD_API_RESET_SCHEMA=true + SAEON_AUTH_CLIENT_SECRET="${{ secrets.SAEON_AUTH_CLIENT_SECRET}}" + NCCRD_HOSTNAME="https://nccrd.saeon.ac.za" + /usr/local/bin/docker-compose --env-file docker-compose.env up -d --force-recreate --build \ No newline at end of file diff --git a/.github/workflows/stable.yml b/.github/workflows/stable-release.yml similarity index 69% rename from .github/workflows/stable.yml rename to .github/workflows/stable-release.yml index d688b7a..895ad93 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable-release.yml @@ -2,6 +2,8 @@ name: deployment@stable on: push: + tags: + - '*' branches: - stable @@ -12,18 +14,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - ref: stable - - deploy: - needs: [source-code] - runs-on: nccrd.saeon.ac.za - steps: - - name: Deploy services - run: >- - NCCRD_API_RESET_SCHEMA=true - SAEON_AUTH_CLIENT_SECRET="${{ secrets.SAEON_AUTH_CLIENT_SECRET}}" - NCCRD_HOSTNAME="https://nccrd.saeon.ac.za" - /usr/local/bin/docker-compose --env-file docker-compose.env up -d --force-recreate --build + ref: stable pkg-releases: needs: [source-code]