This repository has been archived on 2026-05-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
zen-browser-flake/.github/workflows/revert-beta.yml
dependabot[bot] c396e711f7 chore(deps): bump actions/checkout from 5 to 6 (#172)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 13:08:38 -05:00

38 lines
1.1 KiB
YAML

name: Revert Beta Update
on:
workflow_dispatch:
jobs:
revert-beta-update:
name: Revert last beta update
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Find last beta update commit
id: find_commit
run: |
commit_hash=$(git log --oneline --grep="^chore(update):.*beta @" | head -1 | awk '{print $1}')
if [ -z "$commit_hash" ]; then
echo "No beta update commit found"
exit 1
fi
echo "commit_hash=$commit_hash" >> $GITHUB_OUTPUT
- name: Revert the commit
run: |
git revert --no-edit ${{ steps.find_commit.outputs.commit_hash }}
git commit --amend --no-edit -m "$(git log -1 --pretty=%B | sed 's/Revert/revert:/')"
git push