From 60bfb2c8cca963ebb104485f30fbc49cebc8894b Mon Sep 17 00:00:00 2001 From: Nur Fikri Date: Fri, 22 Mar 2024 01:34:18 +0700 Subject: [PATCH] deploy testnet --- .github/workflows/deploy-testnet.yml | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/deploy-testnet.yml diff --git a/.github/workflows/deploy-testnet.yml b/.github/workflows/deploy-testnet.yml new file mode 100644 index 00000000..b0cd5924 --- /dev/null +++ b/.github/workflows/deploy-testnet.yml @@ -0,0 +1,36 @@ +name: Deploy (dev) +on: + pull_request: + branches: [staging] + types: [closed] + push: + branches: [testnet] + repository_dispatch: + types: [deploy-testnet] + workflow_dispatch: + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - id: checkout + name: Checkout + uses: actions/checkout@v3 + with: + ref: testnet + + - id: pull-staging + name: Pull latest 'staging' + run: git pull origin staging + + - id: diff-check + name: Check if 'testnet' is behind 'staging' + run: git diff --exit-code origin/staging + + - id: fast-forward + name: Fast forward 'staging' → 'testnet' + run: git merge --ff-only origin/staging + + - id: push-dev + name: Push latest 'dev' + run: git push --set-upstream origin testnet