mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-07-22 17:15:48 +00:00
chore: remove dead workflows tied to the now-deleted master branch (#12)
master was confirmed unused before deletion: no webhook/deploy-key writes to it, no branch protection, last commit 2026-03-10 (4 months stale), and no open PR targeted it. Its content was already fully contained in main's history (main had since diverged far ahead with v1.0.2/v1.0.3 releases), so nothing was lost. These four workflows existed solely to serve or react to that branch and can never trigger again now that it's gone: - auto-pr.yml / auto-merge.yml: the master->main sync mechanism itself - its entire purpose is gone along with master. - pr_workflow.yml: triggers on `pull_request: branches: [master]` (rc/hotfix release-notes automation) - can't fire, no PRs target master anymore. - update_tag.yml: triggers on `push: branches: ['master']` (auto version tagging) - can't fire either. The last two encode logic (release-notes extraction, auto-tagging) that might still be wanted against main - left that as a separate decision rather than silently re-pointing them, since that would activate new automation behavior nobody asked for here. Deliberately not touching .github/workflows/appium-mobile-tests.yml's `ref: 'master'` - that's a workflow_dispatch call into a *different* repository (pezkuwichain/appium-mobile-tests) and has nothing to do with this repo's now-deleted branch.
This commit is contained in:
@@ -1,47 +0,0 @@
|
|||||||
name: Auto Merge
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_run:
|
|
||||||
workflows: ["Code Quality"]
|
|
||||||
types: [completed]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
auto-merge:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: >
|
|
||||||
github.event.workflow_run.conclusion == 'success' &&
|
|
||||||
github.event.workflow_run.event == 'pull_request'
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
steps:
|
|
||||||
- name: Find and merge master → main PR
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
HEAD_BRANCH="${{ github.event.workflow_run.head_branch }}"
|
|
||||||
echo "Workflow ran on branch: $HEAD_BRANCH"
|
|
||||||
|
|
||||||
if [ "$HEAD_BRANCH" != "master" ]; then
|
|
||||||
echo "Not a master branch PR, skipping"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
PR_NUMBER=$(gh pr list \
|
|
||||||
--repo "$GITHUB_REPOSITORY" \
|
|
||||||
--base main \
|
|
||||||
--head master \
|
|
||||||
--state open \
|
|
||||||
--json number \
|
|
||||||
--jq '.[0].number')
|
|
||||||
|
|
||||||
if [ -z "$PR_NUMBER" ]; then
|
|
||||||
echo "No open PR from master to main found, skipping"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Merging PR #$PR_NUMBER"
|
|
||||||
gh pr merge "$PR_NUMBER" \
|
|
||||||
--repo "$GITHUB_REPOSITORY" \
|
|
||||||
--merge \
|
|
||||||
--delete-branch=false
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
name: Auto PR (master → main)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [master]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
create-pr:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: write
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Create or update PR
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
# Check if there's already an open PR from master to main
|
|
||||||
EXISTING_PR=$(gh pr list --base main --head master --state open --json number --jq '.[0].number')
|
|
||||||
|
|
||||||
if [ -n "$EXISTING_PR" ]; then
|
|
||||||
echo "PR #$EXISTING_PR already exists — new commits will appear automatically"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Creating new PR: master → main"
|
|
||||||
if gh pr create \
|
|
||||||
--base main \
|
|
||||||
--head master \
|
|
||||||
--title "Sync: master → main" \
|
|
||||||
--body "Automated PR to sync master branch changes to main.
|
|
||||||
|
|
||||||
This PR was created automatically and will be merged once CI checks pass."; then
|
|
||||||
echo "PR created successfully"
|
|
||||||
else
|
|
||||||
echo "PR creation skipped (branches may already be in sync)"
|
|
||||||
fi
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
name: PR Workflow
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
pull_request_review_comment:
|
|
||||||
types: [created, edited, deleted]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
checkRef:
|
|
||||||
if: github.event.pull_request.base.ref == 'master' || github.event_name == 'pull_request'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
is_rc: ${{ steps.check_ref.outputs.ref_contains_rc }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Check if "rc" or "hotfix" is present in github.ref
|
|
||||||
id: check_ref
|
|
||||||
run: |
|
|
||||||
echo ${{ github.head_ref || github.ref_name }}
|
|
||||||
if [[ "${{ github.head_ref || github.ref_name }}" == "rc/"* || "${{ github.head_ref || github.ref_name }}" == "hotfix/"* ]]; then
|
|
||||||
echo "ref_contains_rc=1" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "ref_contains_rc=0" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Output check result
|
|
||||||
run: |
|
|
||||||
echo "Output: ${{ steps.check_ref.outputs.ref_contains_rc }}"
|
|
||||||
|
|
||||||
make-or-update-pr:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions: write-all
|
|
||||||
needs: checkRef
|
|
||||||
if: needs.checkRef.outputs.is_rc == '1'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Find Comment
|
|
||||||
uses: peter-evans/find-comment@v3
|
|
||||||
id: fc
|
|
||||||
with:
|
|
||||||
issue-number: ${{ github.event.pull_request.number }}
|
|
||||||
body-includes: Release notes
|
|
||||||
|
|
||||||
- name: Create comment link
|
|
||||||
id: create_link
|
|
||||||
run: |
|
|
||||||
echo "COMMENT_LINK=https://api.github.com/repos/${{ github.repository }}/issues/comments/${{ steps.fc.outputs.comment-id }}" >> $GITHUB_ENV
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Extract version from branch name
|
|
||||||
id: extract_version
|
|
||||||
run: |
|
|
||||||
VERSION=${{ github.head_ref }}
|
|
||||||
VERSION=${VERSION/hotfix/rc} # Replace "hotfix" with "rc"
|
|
||||||
echo "version=${VERSION#*rc/}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- uses: tibdex/github-app-token@v2
|
|
||||||
id: generate-token
|
|
||||||
with:
|
|
||||||
app_id: ${{ secrets.PR_APP_ID }}
|
|
||||||
private_key: ${{ secrets.PR_APP_TOKEN }}
|
|
||||||
|
|
||||||
- name: Run Python script
|
|
||||||
run: python .github/scripts/pr_comment_extract_data.py
|
|
||||||
|
|
||||||
- name: Create new branch and file in pezkuwi-wallet-android-releases repo
|
|
||||||
uses: peter-evans/repository-dispatch@v3
|
|
||||||
with:
|
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
|
||||||
repository: pezkuwichain/pezkuwi-wallet-android-releases
|
|
||||||
event-type: create-pr
|
|
||||||
client-payload: '{"version": "${{ steps.extract_version.outputs.version }}", "comment_link": "${{ env.COMMENT_LINK }}", "time": "${{ env.TIME }}", "severity": "${{ env.SEVERITY }}"}'
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
name: Bump app version
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
['master']
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-tag:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Version in build.gradle
|
|
||||||
run: |
|
|
||||||
versionName=$(grep "versionName" build.gradle | grep -o "'.*'")
|
|
||||||
versionName=${versionName//\'/}
|
|
||||||
echo Version in gradle file: $versionName
|
|
||||||
echo "GRADLE_APP_VERSION=$versionName" >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
- name: Check if tag exists
|
|
||||||
id: version
|
|
||||||
run: |
|
|
||||||
if git rev-parse "v${{ env.GRADLE_APP_VERSION }}" >/dev/null 2>&1; then
|
|
||||||
echo "Tag already exists"
|
|
||||||
echo "changed=false" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "Tag does not exist"
|
|
||||||
echo "changed=true" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- uses: rickstaa/action-create-tag@v1
|
|
||||||
if: steps.version.outputs.changed == 'true'
|
|
||||||
with:
|
|
||||||
tag: 'v${{ env.GRADLE_APP_VERSION }}'
|
|
||||||
message: Release v${{ env.GRADLE_APP_VERSION }}
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
Reference in New Issue
Block a user