Merge main: pull in dead-workflow cleanup

This commit is contained in:
2026-07-09 21:22:06 -07:00
4 changed files with 0 additions and 206 deletions
-47
View File
@@ -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
-40
View File
@@ -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
-76
View File
@@ -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 }}"}'
-43
View File
@@ -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 }}