Skip to content

Commit

Permalink
[FIXUP]
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell committed Sep 2, 2024
1 parent a980457 commit 05a8960
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
24 changes: 6 additions & 18 deletions .github/workflows/checkVersions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
description: The name of the bot that adds the necessary version increment changes
type: string
required: true
excludedProject:
excludedProjects:
description: The comma-separated list of projects that should not be skipped (e.g. products or repositories). Can speed-up the check
type: string
required: false
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
# -Dcompare-version-with-baselines.skip=false
#TODO: exclude products, p2-repos etc:
# https://stackoverflow.com/questions/13266470/how-do-i-exclude-certain-modules-from-a-maven-build-using-the-commandline
# Do something like -pl '!excludedProject.replace(',','!,')'
# Do something like -pl '!excludedProjects.replace(',','!,')'
# Or create a list of all eclipse-plugin and eclipse-feature projects and use it here as input for PL?! Could be done with java-script?!

#TODO: Derive stream version from something
Expand All @@ -72,11 +72,14 @@ jobs:
# Workspace is not clean, i.e. some version were changed
echo "version-incremented=true" >> $GITHUB_OUTPUT
streamVersion=$(xmllint --xpath 'string(/project/properties/releaseName)' eclipse-platform-parent/pom.xml)
echo $streamVersion
git config --global user.email '${{ inputs.botMail }}'
git config --global user.name '${{ inputs.botName }}'
git add --all
git status
git commit -m "Bump version(s) for 4.34 stream"
git commit -m "Bump version(s) for ${streamVersion} stream"
fileList=$(git diff-tree --no-commit-id --name-only HEAD -r)
echo "file-list<<EOF" >> $GITHUB_OUTPUT
Expand All @@ -98,21 +101,6 @@ jobs:
env:
BOT_TOKEN: ${{ secrets.githubBotPAT }}

- name: Push version bump commit
if: ${{ ! steps.git-commit.outputs.version-incremented }}
run: |
echo 'Inc: ${{ steps.git-commit.outputs.version-incremented }}'
echo 'full_name: ${{ github.event.pull_request.head.repo.full_name }}'
echo 'head-ref1: ${{ github.event.pull_request.head.ref }}'
echo 'head-ref2: ${{ github.head_ref }}'
git remote add 'fork' https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git
git remote -v
#git push 'fork' 'HEAD:refs/heads/${{ github.event.pull_request.head.ref }}'
git push \
'https://oauth2:${BOT_TOKEN}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git' \
'HEAD:refs/heads/${{ github.event.pull_request.head.ref }}'
env:
BOT_TOKEN: ${{ secrets.githubBotPAT }}
#TODO: Push it like in https://github.com/ad-m/github-push-action/blob/77c5b412c50b723d2a4fbc6d71fb5723bcd439aa/start.sh#L52
#TODO: use an env-variable to pass the token?!

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
botName: Eclipse Releng Bot
botMail: [email protected]
secrets:
githubBotPAT: ${{ secrets.HANNESWELL_PAT }}
githubBotPAT: 'NOT_REALLY_SIGRID'

0 comments on commit 05a8960

Please sign in to comment.