Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/dispatch_build_scoped_rector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
name: "Wait 20 seconds after push"
run: sleep 20

# a tagged main is already being published by the tag build of rector-src,
# dispatching a second build would race it for the push to rectorphp/rector
-
name: "Check whether rector-src main is a release tag commit"
id: release_tag
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
RECTOR_SRC="https://github.com/rectorphp/rector-src.git"

Expand All @@ -37,13 +37,13 @@ jobs:

# lightweight tags are listed with the commit itself, annotated ones with a "^{}" line
if git ls-remote --tags $RECTOR_SRC | grep -q "^${MAIN_SHA}"; then
echo "rector-src main $MAIN_SHA is tagged, leaving the build to the tag itself"
echo "tagged=true" >> $GITHUB_OUTPUT
echo "rector-src main $MAIN_SHA is tagged, creating a rebuild commit"
git clone --depth 1 --branch main "https://x-access-token:${ACCESS_TOKEN}@github.com/rectorphp/rector-src.git" rector-src
cd rector-src
git config user.name "TomasVotruba"
git config user.email "tomas.vot@gmail.com"
git commit --allow-empty -m 'Rebuild' -a
git push origin main
else
gh workflow run build_scoped_rector.yaml --repo rectorphp/rector-src --ref main
fi

-
name: "Trigger build_scoped_rector.yaml in rectorphp/rector-src"
if: steps.release_tag.outputs.tagged != 'true'
env:
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: gh workflow run build_scoped_rector.yaml --repo rectorphp/rector-src --ref main
Loading