Skip to content

Commit c6c1e4a

Browse files
authored
Use obol platform PAT (#20)
1 parent 90d7850 commit c6c1e4a

File tree

2 files changed

+62
-4
lines changed

2 files changed

+62
-4
lines changed

.github/workflows/sync-rebase.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@ jobs:
1717
with:
1818
ref: master
1919

20+
- name: Configure Git user
21+
run: |
22+
git config --global user.name "obol-platform"
23+
git config --global user.email "[email protected]"
24+
2025
- name: Sync upstream changes
2126
id: sync
2227
uses: aormsby/[email protected]
2328
with:
2429
target_sync_branch: master
25-
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
30+
target_repo_token: ${{ secrets.OBOL_PLATFORM_PAT }}
2631
upstream_sync_branch: master
2732
upstream_sync_repo: attestantio/go-eth2-client
2833

@@ -38,12 +43,27 @@ jobs:
3843
fetch-depth: 0
3944
ref: obol
4045

46+
- name: Import GPG key
47+
env:
48+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
49+
run: |
50+
echo "$GPG_PRIVATE_KEY" | base64 -d | gpg --batch --import
51+
gpg --list-secret-keys --keyid-format LONG
52+
53+
- name: Configure Git user
54+
run: |
55+
git config --global user.name "obol-platform"
56+
git config --global user.email "[email protected]"
57+
git config --global user.signingkey "$(gpg --list-secret-keys --keyid-format LONG [email protected] | grep sec | awk '{print $2}' | cut -d'/' -f2)"
58+
git config --global commit.gpgsign true
59+
git config --global tag.gpgsign true
60+
4161
- name: Rebase branch obol
4262
id: rebase
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.OBOL_PLATFORM_PAT }}
4365
run: |
4466
echo "Rebasing branch obol on branch master"
45-
git config user.name 'github-actions'
46-
git config user.email '[email protected]'
4767
git fetch
4868
{
4969
echo "RESULT<<EOF"
@@ -54,6 +74,8 @@ jobs:
5474
5575
- name: Push changes
5676
if: contains(steps.rebase.outputs.RESULT, 'Successfully rebased and updated')
77+
env:
78+
GITHUB_TOKEN: ${{ secrets.OBOL_PLATFORM_PAT }}
5779
run: |
5880
echo "Force pushing rebased branch"
5981
git push --force-with-lease origin obol

.github/workflows/tag.yml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,25 @@ jobs:
2222
with:
2323
ref: master
2424

25+
- name: Import GPG key
26+
env:
27+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
28+
run: |
29+
echo "$GPG_PRIVATE_KEY" | base64 -d | gpg --batch --import
30+
gpg --list-secret-keys --keyid-format LONG
31+
32+
- name: Configure Git user
33+
run: |
34+
git config --global user.name "obol-platform"
35+
git config --global user.email "[email protected]"
36+
git config --global user.signingkey "$(gpg --list-secret-keys --keyid-format LONG [email protected] | grep sec | awk '{print $2}' | cut -d'/' -f2)"
37+
git config --global commit.gpgsign true
38+
git config --global tag.gpgsign true
39+
2540
- name: Fetch tags from upstream
2641
id: fetch
2742
env:
28-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
GITHUB_TOKEN: ${{ secrets.OBOL_PLATFORM_PAT }}
2944
run: |
3045
echo "Adding upstream repository"
3146
git remote add upstream https://github.com/attestantio/go-eth2-client
@@ -75,6 +90,8 @@ jobs:
7590
7691
- name: Sync upstream tags
7792
if: steps.get_latest_tag.outputs.HAS_NEW_TAG == 'true'
93+
env:
94+
GITHUB_TOKEN: ${{ secrets.OBOL_PLATFORM_PAT }}
7895
run: |
7996
echo "Pushing tags to origin"
8097
git push --tags
@@ -92,8 +109,25 @@ jobs:
92109
fetch-depth: 0
93110
ref: obol
94111

112+
- name: Import GPG key
113+
env:
114+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
115+
run: |
116+
echo "$GPG_PRIVATE_KEY" | base64 -d | gpg --batch --import
117+
gpg --list-secret-keys --keyid-format LONG
118+
119+
- name: Configure Git user
120+
run: |
121+
git config --global user.name "obol-platform"
122+
git config --global user.email "[email protected]"
123+
git config --global user.signingkey "$(gpg --list-secret-keys --keyid-format LONG [email protected] | grep sec | awk '{print $2}' | cut -d'/' -f2)"
124+
git config --global commit.gpgsign true
125+
git config --global tag.gpgsign true
126+
95127
- name: Rebase branch obol
96128
id: rebase
129+
env:
130+
GITHUB_TOKEN: ${{ secrets.OBOL_PLATFORM_PAT }}
97131
run: |
98132
echo "Rebasing branch obol on tag ${{ needs.fetch_latest_tag.outputs.latest_tag }}"
99133
git fetch
@@ -106,6 +140,8 @@ jobs:
106140
107141
- name: Tag obolnetwork/go-eth2-client
108142
if: contains(steps.rebase.outputs.RESULT, 'Successfully rebased and updated') || contains(steps.rebase.outputs.RESULT, 'is up to date.')
143+
env:
144+
GITHUB_TOKEN: ${{ secrets.OBOL_PLATFORM_PAT }}
109145
run: |
110146
tag="${{ needs.fetch_latest_tag.outputs.latest_tag }}-obol"
111147
echo "Tagging new obolnetwork/go-eth2-client $tag"

0 commit comments

Comments
 (0)