Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions .github/workflows/sync-rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,17 @@ jobs:
with:
ref: master

- name: Configure Git user
run: |
git config --global user.name "obol-platform"
git config --global user.email "[email protected]"
- name: Sync upstream changes
id: sync
uses: aormsby/[email protected]
with:
target_sync_branch: master
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
target_repo_token: ${{ secrets.OBOL_PLATFORM_PAT }}
upstream_sync_branch: master
upstream_sync_repo: attestantio/go-eth2-client

Expand All @@ -38,12 +43,27 @@ jobs:
fetch-depth: 0
ref: obol

- name: Import GPG key
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: |
echo "$GPG_PRIVATE_KEY" | base64 -d | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Configure Git user
run: |
git config --global user.name "obol-platform"
git config --global user.email "[email protected]"
git config --global user.signingkey "$(gpg --list-secret-keys --keyid-format LONG [email protected] | grep sec | awk '{print $2}' | cut -d'/' -f2)"
git config --global commit.gpgsign true
git config --global tag.gpgsign true
- name: Rebase branch obol
id: rebase
env:
GITHUB_TOKEN: ${{ secrets.OBOL_PLATFORM_PAT }}
run: |
echo "Rebasing branch obol on branch master"
git config user.name 'github-actions'
git config user.email '[email protected]'
git fetch
{
echo "RESULT<<EOF"
Expand All @@ -54,6 +74,8 @@ jobs:
- name: Push changes
if: contains(steps.rebase.outputs.RESULT, 'Successfully rebased and updated')
env:
GITHUB_TOKEN: ${{ secrets.OBOL_PLATFORM_PAT }}
run: |
echo "Force pushing rebased branch"
git push --force-with-lease origin obol
Expand Down
38 changes: 37 additions & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,25 @@ jobs:
with:
ref: master

- name: Import GPG key
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: |
echo "$GPG_PRIVATE_KEY" | base64 -d | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Configure Git user
run: |
git config --global user.name "obol-platform"
git config --global user.email "[email protected]"
git config --global user.signingkey "$(gpg --list-secret-keys --keyid-format LONG [email protected] | grep sec | awk '{print $2}' | cut -d'/' -f2)"
git config --global commit.gpgsign true
git config --global tag.gpgsign true
- name: Fetch tags from upstream
id: fetch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.OBOL_PLATFORM_PAT }}
run: |
echo "Adding upstream repository"
git remote add upstream https://github.com/attestantio/go-eth2-client
Expand Down Expand Up @@ -75,6 +90,8 @@ jobs:
- name: Sync upstream tags
if: steps.get_latest_tag.outputs.HAS_NEW_TAG == 'true'
env:
GITHUB_TOKEN: ${{ secrets.OBOL_PLATFORM_PAT }}
run: |
echo "Pushing tags to origin"
git push --tags
Expand All @@ -92,8 +109,25 @@ jobs:
fetch-depth: 0
ref: obol

- name: Import GPG key
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: |
echo "$GPG_PRIVATE_KEY" | base64 -d | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Configure Git user
run: |
git config --global user.name "obol-platform"
git config --global user.email "[email protected]"
git config --global user.signingkey "$(gpg --list-secret-keys --keyid-format LONG [email protected] | grep sec | awk '{print $2}' | cut -d'/' -f2)"
git config --global commit.gpgsign true
git config --global tag.gpgsign true
- name: Rebase branch obol
id: rebase
env:
GITHUB_TOKEN: ${{ secrets.OBOL_PLATFORM_PAT }}
run: |
echo "Rebasing branch obol on tag ${{ needs.fetch_latest_tag.outputs.latest_tag }}"
git fetch
Expand All @@ -106,6 +140,8 @@ jobs:
- name: Tag obolnetwork/go-eth2-client
if: contains(steps.rebase.outputs.RESULT, 'Successfully rebased and updated') || contains(steps.rebase.outputs.RESULT, 'is up to date.')
env:
GITHUB_TOKEN: ${{ secrets.OBOL_PLATFORM_PAT }}
run: |
tag="${{ needs.fetch_latest_tag.outputs.latest_tag }}-obol"
echo "Tagging new obolnetwork/go-eth2-client $tag"
Expand Down
Loading