diff options
Diffstat (limited to '')
-rw-r--r-- | .github/workflows/crmsh-cd.yml | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/.github/workflows/crmsh-cd.yml b/.github/workflows/crmsh-cd.yml new file mode 100644 index 0000000..48b03a0 --- /dev/null +++ b/.github/workflows/crmsh-cd.yml @@ -0,0 +1,57 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions +# For more information about secrets see: https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets + +name: crmsh CD + +on: push + +env: + PACKAGE_NAME: crmsh + CONTAINER_IMAGE: nyang23/obs-continuous-delivery:latest + OBS_USER: ${{ secrets.OBS_USER }} + OBS_PASS: ${{ secrets.OBS_PASS }} + OBS_PROJECT: ${{ secrets.OBS_PROJECT_CRMSH45 }} + TARGET_PROJECT: ${{ secrets.TARGET_PROJECT }} + +jobs: + integration: + if: github.repository == 'ClusterLabs/crmsh' && github.ref_name == 'crmsh-4.6' + uses: ./.github/workflows/crmsh-ci.yml + + delivery: + if: github.repository == 'ClusterLabs/crmsh' && github.ref_name == 'crmsh-4.6' + needs: integration + runs-on: ubuntu-20.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - name: delivery process + run: | + docker pull "${CONTAINER_IMAGE}" + docker run -t -v "$(pwd)":/package:ro \ + -e OBS_USER=$OBS_USER \ + -e OBS_PASS=$OBS_PASS \ + -e OBS_PROJECT=$OBS_PROJECT \ + -e PACKAGE_NAME=$PACKAGE_NAME \ + "${CONTAINER_IMAGE}" \ + /bin/bash -c "cp -r /package ~/package && cd ~/package && /scripts/upload.sh" + + submit: + if: github.repository == 'ClusterLabs/crmsh' && github.ref_name == 'crmsh-4.6' + needs: delivery + runs-on: ubuntu-20.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - name: submit process + run: | + docker pull "${CONTAINER_IMAGE}" + docker run -t \ + -e OBS_USER=$OBS_USER \ + -e OBS_PASS=$OBS_PASS \ + -e OBS_PROJECT=$OBS_PROJECT \ + -e PACKAGE_NAME=$PACKAGE_NAME \ + -e TARGET_PROJECT=$TARGET_PROJECT \ + "${CONTAINER_IMAGE}" \ + /bin/bash -c "cd ~ && /scripts/submit.sh" |