Skip to content

Commit

Permalink
[no ci] combine-prs.yml: use ssh keys
Browse files Browse the repository at this point in the history
  • Loading branch information
nbauma109 committed Oct 23, 2022
1 parent 2ac2d1c commit beed648
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/combine-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,23 @@ jobs:
base: baseBranch,
body: body
});
- name: Checkout repository
uses: actions/checkout@v2
with:
token: ${{ secrets.MULTI_USAGE_TOKEN }}
ref: ${{ github.event.inputs.combineBranchName }}
- name: Create .ssh directory
run: mkdir $HOME/.ssh
- name: Create known hosts file
run: echo "${{ secrets.KNOWN_HOSTS }}" > $HOME/.ssh/known_hosts
- name: Create private key
run: |
echo "${{ secrets.SSH_PRIVATE_KEY }}" > $HOME/.ssh/id_ed25519
chmod 600 $HOME/.ssh/id_ed25519
- name: Setup git user
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
git config --global user.email "git@github.com"
git config --global user.name "git"
- name: Update Version
env:
GITHUB_TOKEN: ${{ secrets.MULTI_USAGE_TOKEN }}
run: |
git checkout ${{ github.event.inputs.combineBranchName }}
git clone [email protected]:nbauma109/jd-eclipse.git
cd jd-eclipse
git checkout '${{ github.event.inputs.combineBranchName }}'
git log | grep -w Bump | grep -w from | grep -w to | cut -d' ' -f6,8,10 | xargs -n3 bash -c 'shopt -s globstar && sed -bi "s/$1-$2/$1-$3/g" **/MANIFEST.MF **/build.properties **/.classpath' sh-replace-in-files
git commit -a -m "Updated versions in **/MANIFEST.MF **/build.properties"
git push

0 comments on commit beed648

Please sign in to comment.