Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devops: use same branch and override stable rolls #1552

Merged
merged 1 commit into from
Oct 7, 2024
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
21 changes: 18 additions & 3 deletions .github/workflows/roll-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ jobs:
- name: Prepare branch
id: prepare-branch
run: |
BRANCH_NAME="roll/stable-$(date +"%d-%m-%y")"
VERSION=${{ steps.determine-version.outputs.result }}
BRANCH_NAME="roll/stable-$VERSION"
set +e
git diff -s --exit-code
HAS_CHANGES="$?"
Expand All @@ -69,11 +70,25 @@ jobs:
# We only want to upgrade the version itself, not the next release
git add "*versioned*"
git add "**/versions.json"
git commit -m "feat(roll): roll to ${{ steps.determine-version.outputs.result }} Playwright"
git commit -m "feat(roll): roll to $VERSION Playwright"
git push origin $BRANCH_NAME --force
- name: Check for existing Pull Request
id: check-pr
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
script: |
const { data: pullRequests } = await github.rest.pulls.list({
owner: 'microsoft',
repo: 'playwright.dev',
head: `microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}`,
state: 'open'
});
return pullRequests.length > 0 ? 'true' : 'false';
result-encoding: string
- name: Create Pull Request
uses: actions/github-script@v7
if: ${{ steps.prepare-branch.outputs.HAS_CHANGES == '1' }}
if: ${{ steps.prepare-branch.outputs.HAS_CHANGES == '1' && steps.check-pr.outputs.result == 'false' }}
with:
github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
script: |
Expand Down
Loading