Skip to content

Commit

Permalink
Merge pull request #243 from tidyverse/f-fledge
Browse files Browse the repository at this point in the history
ci: Fix fledge
  • Loading branch information
krlmlr authored Aug 19, 2024
2 parents 0bd4a10 + 3407ebc commit 9228e3c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/fledge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ jobs:
steps:
- name: Check if the repo is forked
id: check
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "is_forked=$(curl -s -H "Accept: application/vnd.github+json" -H 'Authorization: Bearer ${{ github.token }}' -H "X-GitHub-Api-Version: 2022-11-28" ${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY} | jq .fork)" >> $GITHUB_OUTPUT
is_forked=$(gh api repos/${{ github.repository }} | jq .fork)
echo "is_forked=${is_forked}" >> $GITHUB_OUTPUT
shell: bash

fledge:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -79,7 +83,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
check_default_branch <- ("${{ github.ref_protected }}" != "true")
check_default_branch <- ("${{ github.ref_protected == 'true' || inputs.pr }}" != "true")
if (fledge::bump_version(which = "dev", no_change_behavior = "noop", check_default_branch = check_default_branch)) {
fledge::finalize_version(push = TRUE)
}
Expand All @@ -90,12 +94,15 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create --base main --head fledge --title "Bump version" --body "Bump version"
set -x
gh pr create --base main --head fledge --fill-first
gh workflow run rcc -f ref=$(git rev-parse HEAD)
gh pr merge --merge --auto
shell: bash

- name: Check release
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
fledge:::release_after_cran_built_binaries()
shell: Rscript {0}

0 comments on commit 9228e3c

Please sign in to comment.