Skip to content

Dummy change

Dummy change #23

name: Apply necessary version bumps
on:
# workflow_call:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
version-bumps:
name: Bump service versions
runs-on: ubuntu-latest
permissions: write-all #TODO: more fine-grained! https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token
# pull-requests: read
steps:
- name: Dump GitHub context
id: github_context_step
run: echo '${{ toJSON(github) }}'
- name: Dump job context
run: echo '${{ toJSON(job) }}'
- name: Dump steps context
run: echo '${{ toJSON(steps) }}'
- name: Dump runner context
run: echo '${{ toJSON(runner) }}'
- name: Dump strategy context
run: echo '${{ toJSON(strategy) }}'
- name: Dump matrix context
run: echo '${{ toJSON(matrix) }}'
- uses: actions/checkout@v4
- run: |
git config --list
- run: |
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 config --global user.email '[email protected]'
git config --global user.name 'Eclipse Releng Bot'
git checkout ${{ github.sha }}
echo 'Hello World' > myfile.txt
git add --all *
git status
git commit -m "Bump version(s) for 4.34 stream"
git status
- name: Push version bump commit
if: ${{ github.event_name == 'pull_request' }}
run: |
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 }}'
#TODO: make version dynamic and mail and bot name configurable?!
# See
# https://github.com/actions/toolkit
# https://github.com/actions/github-script
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs