mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-11-03 01:11:10 +00:00
Fix resolc-bin push auth (#543)
Pushes to `resolc-bin` 403ed after bumping `actions/checkout` to `v6` (detected by [failure of the nightly release](https://github.com/paritytech/revive/actions/runs/27049132601/job/79841157330)). This PR now passes the app token to the resolc-bin checkout via [`token:`](https://github.com/actions/checkout/blob/df4cb1c069e1874edd31b4311f1884172cec0e10/README.md?plain=1#L66-L76) and drops the remote-URL/sed workaround.
This commit is contained in:
3 files changed
+23
-41
No files matched your search
@@ -64,19 +64,7 @@ jobs:
|
||||
with:
|
||||
path: revive
|
||||
|
||||
- name: Checkout resolc-bin
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: paritytech/resolc-bin
|
||||
path: resolc-bin
|
||||
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
merge-multiple: true
|
||||
path: bins
|
||||
|
||||
- uses: actions/create-github-app-token@v1
|
||||
- uses: actions/create-github-app-token@v3
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ secrets.REVIVE_JSON_APP_ID }}
|
||||
@@ -84,13 +72,23 @@ jobs:
|
||||
owner: paritytech
|
||||
repositories: resolc-bin
|
||||
|
||||
- name: Checkout resolc-bin
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: paritytech/resolc-bin
|
||||
path: resolc-bin
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
merge-multiple: true
|
||||
path: bins
|
||||
|
||||
- name: Generate JSON
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
APP_NAME: "paritytech-revive-json"
|
||||
Green: "\e[32m"
|
||||
NC: "\e[0m"
|
||||
run: |
|
||||
# Rename resolc-web_js_* output keys to resolc-web.js_* expected by the script.
|
||||
echo '${{ toJSON(needs.build.outputs) }}' \
|
||||
@@ -111,13 +109,6 @@ jobs:
|
||||
bash ../revive/.github/scripts/resolc-bin-gh-pages.sh $PWD
|
||||
git status
|
||||
|
||||
echo "${Green}Add new remote with gh app token${NC}"
|
||||
git remote set-url origin $(git config remote.origin.url | sed "s/github.com/${APP_NAME}:${TOKEN}@github.com/g")
|
||||
|
||||
echo "${Green}Remove http section that causes issues with gh app auth token${NC}"
|
||||
sed -i.bak '/\[http/d' ./.git/config
|
||||
sed -i.bak '/extraheader/d' ./.git/config
|
||||
|
||||
git config user.email "ci@parity.io"
|
||||
git config user.name "${APP_NAME}"
|
||||
|
||||
|
||||
Reference in new issue
Block a user