diff --git a/.github/workflows/deploy-testnet-dev.yml b/.github/workflows/deploy-testnet-dev.yml new file mode 100644 index 00000000..3125956b --- /dev/null +++ b/.github/workflows/deploy-testnet-dev.yml @@ -0,0 +1,36 @@ +name: Deploy (testnet-dev) +on: + pull_request: + branches: [staging] + types: [closed] + push: + branches: [testnet-dev] + repository_dispatch: + types: [deploy-testnet-dev] + 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-dev' + run: git merge --ff-only origin/staging + + - id: push-testnet-dev + name: Push latest 'testnet-dev' + run: git push --set-upstream origin testnet-dev diff --git a/.github/workflows/deploy-testnet.yml b/.github/workflows/deploy-testnet.yml index b0cd5924..d9d6ef79 100644 --- a/.github/workflows/deploy-testnet.yml +++ b/.github/workflows/deploy-testnet.yml @@ -1,4 +1,4 @@ -name: Deploy (dev) +name: Deploy (testnet) on: pull_request: branches: [staging] @@ -31,6 +31,6 @@ jobs: name: Fast forward 'staging' → 'testnet' run: git merge --ff-only origin/staging - - id: push-dev - name: Push latest 'dev' + - id: push-testnet + name: Push latest 'testnet' run: git push --set-upstream origin testnet