diff --git a/.github/renovate.json b/.github/renovate.json index 3bf74c613..a96d84db6 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,6 +1,6 @@ { "extends": ["github>ssvlabs/shared-configs//renovate/renovate.json"], - "baseBranchPatterns": ["pre-stage"], + "baseBranchPatterns": ["stage"], "schedule": ["every week"], "timezone": "UTC", "separateMajorMinor": false, diff --git a/.github/workflows/auto_pr_prestage_to_stage.yml b/.github/workflows/auto_pr_prestage_to_stage.yml deleted file mode 100644 index 168356aac..000000000 --- a/.github/workflows/auto_pr_prestage_to_stage.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Auto PR - Pre-Stage to Stage - -on: - push: - branches: - - pre-stage - -jobs: - create_pr: - name: Create PR from Pre-Stage to Stage - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - - steps: - - name: Checkout repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - - - name: Setup Node.js - uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3 - with: - node-version: 20.12.2 - - - name: Run PR automation - run: node scripts/pr-automation/index.cjs - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN || github.token }} - GITHUB_REPOSITORY: ${{ github.repository }} \ No newline at end of file diff --git a/.github/workflows/auto_pr_to_prestage.yml b/.github/workflows/auto_pr_to_prestage.yml deleted file mode 100644 index 2ec7ca02b..000000000 --- a/.github/workflows/auto_pr_to_prestage.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Auto PR - Branch to Pre-Stage - -on: - push: - branches-ignore: - - pre-stage - - stage - - main - -jobs: - create_pr: - name: Create PR from Branch to Pre-Stage - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - - steps: - - name: Checkout repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - with: - fetch-depth: 0 - - - name: Check if branch is based on pre-stage - id: check_base - run: | - BRANCH_NAME=${GITHUB_REF#refs/heads/} - echo "Checking if $BRANCH_NAME is based on pre-stage..." - - # Fetch pre-stage branch - git fetch origin pre-stage 2>/dev/null || true - - # Get the merge base between pre-stage and current branch - MERGE_BASE=$(git merge-base origin/pre-stage HEAD 2>/dev/null || echo "") - PRESTAGE_HEAD=$(git rev-parse origin/pre-stage 2>/dev/null || echo "") - - # Check if pre-stage is an ancestor and if merge-base equals pre-stage HEAD - # This means the branch diverged directly from pre-stage - if [ -n "$MERGE_BASE" ] && [ -n "$PRESTAGE_HEAD" ] && [ "$MERGE_BASE" = "$PRESTAGE_HEAD" ]; then - echo "is_based_on_prestage=true" >> $GITHUB_OUTPUT - echo "✅ Branch $BRANCH_NAME is based on pre-stage" - else - echo "is_based_on_prestage=false" >> $GITHUB_OUTPUT - echo "ℹ️ Branch $BRANCH_NAME is not directly based on pre-stage, skipping" - fi - - - name: Setup Node.js - if: steps.check_base.outputs.is_based_on_prestage == 'true' - uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3 - with: - node-version: 20.12.2 - - - name: Run PR automation - if: steps.check_base.outputs.is_based_on_prestage == 'true' - run: node scripts/pr-automation/to-prestage.cjs - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN || github.token }} - GITHUB_REPOSITORY: ${{ github.repository }} - GITHUB_REF: ${{ github.ref }} - GITHUB_HEAD_REF: ${{ github.head_ref }} - diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index bc958365a..b9804a03a 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -101,28 +101,6 @@ jobs: role-to-assume: ${{ secrets.SSV_WEB_AWS_IAM_ROLE }} aws-region: ${{ vars.AWS_REGION }} - # pre-stage - - name: Run stage webapp build - if: github.ref == 'refs/heads/pre-stage' - run: > - GAS_PRICE="${{ env.GAS_PRICE }}" - GAS_LIMIT="${{ env.GAS_LIMIT }}" - SSV_NETWORKS="${{ env.STAGE_SSV_NETWORKS }}" - MIXPANEL_TOKEN_STAGE="${{ secrets.MIXPANEL_TOKEN_STAGE }}" - LINK_SSV_DEV_DOCS="$LINK_SSV_DEV_DOCS" - pnpm build - env: - GAS_PRICE: ${{ secrets.GAS_PRICE }} - GAS_LIMIT: ${{ secrets.GAS_LIMIT }} - LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }} - MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_TOKEN_STAGE }} - - - name: Upload files to S3 - if: github.ref == 'refs/heads/pre-stage' - run: | - aws s3 cp ./build s3://${{ secrets.SSV_WEB_PRE_STAGE_AWS_S3_BUCKET }} --recursive - # - # - name: Run stage webapp build if: github.ref == 'refs/heads/stage' diff --git a/.github/workflows/delete_merged_branch.yml b/.github/workflows/delete_merged_branch.yml deleted file mode 100644 index d551a6010..000000000 --- a/.github/workflows/delete_merged_branch.yml +++ /dev/null @@ -1,18 +0,0 @@ -# .github/workflows/delete_merged_branch.yml -name: Delete Merged Branch - -on: - pull_request_target: - types: [closed] - branches: - - pre-stage - -jobs: - delete_branch: - if: github.event.pull_request.merged == true - runs-on: ubuntu-latest - steps: - - name: Delete merged branch - run: gh api -X DELETE repos/${{ github.repository }}/git/refs/heads/${{ github.event.pull_request.head.ref }} - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}