Skip to content

Commit bc7ca4b

Browse files
committed
fix: revert changes that caused issues with pull requests
Revert "fix: authorize github action user to write content" This reverts commit c359bb5. Revert "fix: in pull requests checkout the pull request branch" This reverts commit 0aa2ec6. Revert "chore(fix): when in a PR and created by PR attempt to add generated files (#35)" This reverts commit df66863.
1 parent c359bb5 commit bc7ca4b

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

.github/workflows/ci.lib.yaml

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,16 @@ name: CI
33
on:
44
workflow_call:
55

6-
permissions:
7-
contents: write # we need this to be able to push to the pull request
8-
96
jobs:
107
build:
118
runs-on: ubuntu-24.04
129

1310
steps:
14-
- name: Create GitHub App token
15-
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2
16-
id: app-token
17-
with:
18-
# required
19-
app-id: 1312871
20-
private-key: ${{ secrets.OPENMCP_CI_APP_PRIVATE_KEY }}
21-
2211
- name: Checkout code
2312
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2413
with:
2514
submodules: recursive
2615

27-
- name: Checkout pull request branch
28-
if: ${{ github.event_name == 'pull_request' }}
29-
run: |
30-
git fetch origin ${{ github.event.pull_request.head.ref }}:$GITHUB_HEAD_REF
31-
git checkout $GITHUB_HEAD_REF
32-
3316
- name: Set up Go
3417
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
3518
with:
@@ -43,28 +26,6 @@ jobs:
4326
- name: task generate
4427
run: |
4528
task generate --verbose
46-
47-
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
48-
PR_USER=$(jq -r .pull_request.user.login "$GITHUB_EVENT_PATH")
49-
if [ "$PR_USER" = "renovate[bot]" ]; then
50-
echo "attempting to commit generated files"
51-
52-
AUTHOR_NAME=$(git log -1 --pretty=format:'%an')
53-
AUTHOR_EMAIL=$(git log -1 --pretty=format:'%ae')
54-
echo "Committing as $AUTHOR_NAME <$AUTHOR_EMAIL>"
55-
56-
echo "AUTHOR_NAME=$AUTHOR_NAME" >> $GITHUB_ENV
57-
echo "AUTHOR_EMAIL=$AUTHOR_EMAIL" >> $GITHUB_ENV
58-
59-
git config user.name "$AUTHOR_NAME"
60-
git config user.email "$AUTHOR_EMAIL"
61-
62-
git add -A
63-
git commit -m "chore: regenerate files" || echo "No changes to commit"
64-
git push origin "${{ github.head_ref }}" || echo "No changes to push"
65-
fi
66-
fi
67-
6829
git diff --exit-code
6930
7031
- name: task validate

0 commit comments

Comments
 (0)