6262
6363 DESCRIPTION="Developer environment orchestration tool"
6464
65+ mkdir -p ppa
66+
6567 for ARCH in amd64 arm64; do
6668 SRCBIN="bin/linux-${ARCH}/gitte"
6769 PKGDIR="pkg/gitte_${VERSION}_${ARCH}"
@@ -93,10 +95,20 @@ jobs:
9395 ppa/ deploy@gitte-ppa.cego.dk:/var/www/ppa/
9496 rm /tmp/ppa_key
9597
98+ - name : Generate app token for formula push
99+ if : github.ref_type == 'tag'
100+ id : app-token
101+ uses : actions/create-github-app-token@v1
102+ with :
103+ app-id : ${{ secrets.APP_ID }}
104+ private-key : ${{ secrets.APP_PRIVATE_KEY }}
105+ repositories : gitte
106+
96107 - name : Update Homebrew formula
97108 if : github.ref_type == 'tag'
98109 env :
99110 VERSION : ${{ github.ref_name }}
111+ APP_TOKEN : ${{ steps.app-token.outputs.token }}
100112 run : |
101113 SHA_DARWIN_AMD64=$(sha256sum bin/gitte-darwin-amd64.tar.gz | awk '{print $1}')
102114 SHA_DARWIN_ARM64=$(sha256sum bin/gitte-darwin-arm64.tar.gz | awk '{print $1}')
@@ -105,8 +117,9 @@ jobs:
105117
106118 git config user.email "noc+gitte@cego.dk"
107119 git config user.name "CI"
108- git fetch origin 2.x
109- git checkout 2.x
120+ git remote set-url origin "https://x-access-token:${APP_TOKEN}@github.com/cego/gitte"
121+ git fetch origin main
122+ git checkout main
110123
111124 mkdir -p Formula
112125
@@ -149,4 +162,4 @@ jobs:
149162
150163 git add Formula/gitte.rb
151164 git commit -m "Update Homebrew formula for ${VERSION}"
152- git push origin 2.x
165+ git push origin main
0 commit comments