Skip to content

Commit

Permalink
Implement automigration from ASH to PSH in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelLipski committed Aug 30, 2023
1 parent 0dde343 commit 90ba8af
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion .github/workflows/standard-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,47 @@ jobs:
run: sbt test
working-directory: examples/akka-persistence-app

# <START-AKKA>
open-pr-to-ash:
if: github.event_name != 'pull_request'
needs: [code-style-check, test-212, test-213-1, test-213-2, test-sbt-plugin, run-examples]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Fetch all history so that a push to pekko-serialization-helper succeeds.
# See https://stackoverflow.com/q/76470864
fetch-depth: 0
- uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1
- run: git status
- run: git checkout -b chore/from-ash
- run: curl -sL https://raw.githubusercontent.com/ap/rename/master/rename | sudo tee /usr/local/bin/rename
- run: sudo chmod +x /usr/local/bin/rename
- run: ./scripts/akka-to-pekko
- run: git add .
- run: git config user.email "[email protected]"
- run: git config user.name "Pekko Serialization Helper Bot"
- run: git commit -m 'Migrate commit from ASH'
- run: git clean -dxf
- run: ./scripts/format-code
- run: git commit -a --amend --no-edit
- env:
# 2.1 Generate an SSH key in terminal (Leave the passphrase empty)
# 2.2 Add public key in the external repository: <external repository>/Settings/Deploy keys/Add deploy key
# Paste the public key. Enable "Allow write access"
# 2.3 Add private key in the source repository: <external repository>/Settings/Secrets/Actions/New repository secret
# Paste the private key.
PSH_SSH_PRIVATE_KEY: ${{ secrets.PSH_SSH_PRIVATE_KEY }}
run: mkdir -p ~/.ssh/ && echo "$PSH_SSH_PRIVATE_KEY" > ~/.ssh/psh && chmod 400 ~/.ssh/psh
- run: git config --add --local core.sshCommand 'ssh -i ~/.ssh/psh'
- run: git push --force [email protected]:VirtusLab/pekko-serialization-helper.git main
# <END-AKKA>

publish-maven-artifacts:
needs: [code-style-check, test-212, test-213-1, test-213-2, test-sbt-plugin, run-examples]
if: github.event_name != 'pull_request'
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: coursier/cache-action@v6
Expand Down

0 comments on commit 90ba8af

Please sign in to comment.