Update workflows

This commit is contained in:
Konstantin Wohlwend
2026-05-21 16:22:04 -07:00
parent 35f3e699dd
commit fe6f053e0e
4 changed files with 3 additions and 105 deletions
-36
View File
@@ -1,36 +0,0 @@
name: Mirror main branch to main-mirror-for-wdb
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' }}
jobs:
lint_and_build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Mirror branch
run: |
git pull --all
git switch -c main-mirror-for-wdb
git reset --hard origin/main
- name: Trigger rebuild
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git commit --allow-empty -m "Trigger Vercel rebuild"
- name: Push branch
run: |
git push -f origin main-mirror-for-wdb
+2
View File
@@ -16,11 +16,13 @@ concurrency:
jobs:
publish:
runs-on: ubuntu-latest
environment: "hexclave/stack-auth — Publish npm packages"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
token: ${{ secrets.NPM_PUBLISH_VERSION_UPDATE_PR_PAT }}
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
-68
View File
@@ -1,68 +0,0 @@
name: Sync Main to Dev
on:
push:
branches:
- main
jobs:
sync-commits:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Sync main commits to dev
run: |
# Fetch all branches
git fetch origin dev:dev
# Switch to dev branch
git checkout dev
# Find commits on main that are not on dev
COMMITS_TO_CHERRY_PICK=$(git rev-list --reverse main ^dev)
if [ -z "$COMMITS_TO_CHERRY_PICK" ]; then
echo "No commits to sync from main to dev"
exit 0
fi
echo "Found commits to cherry-pick:"
echo "$COMMITS_TO_CHERRY_PICK"
# Cherry-pick each commit
SUCCESS=true
for COMMIT in $COMMITS_TO_CHERRY_PICK; do
echo "Cherry-picking commit: $COMMIT"
if ! git cherry-pick $COMMIT; then
echo "Cherry-pick failed for commit $COMMIT"
# Try to continue with --allow-empty in case it's already applied
if ! git cherry-pick --continue --allow-empty 2>/dev/null; then
echo "Failed to cherry-pick $COMMIT, aborting"
git cherry-pick --abort
SUCCESS=false
break
fi
fi
done
if [ "$SUCCESS" = true ]; then
# Push changes to dev
git push origin dev
echo "Successfully synced commits from main to dev"
else
echo "Failed to sync some commits"
exit 1
fi