[ci] Run cronjob with app secrets (#1420)

* [ci] Run cronjob with app secrets

* rm github url

* move token creation closer to pr creation

* return checkout

* check that credentials work

* test gha

* add more test

* create test file

* rm tests

* add compression+decompression to avoid >100MB

* add shell field to action

* move zipped file to correct location

* strip binaries

---------

Co-authored-by: Tadeo hepperle <tadeo@do-mix.de>
This commit is contained in:
Alexander Samusev
2024-02-14 11:33:38 +01:00
committed by GitHub
parent 25ff4ecc8b
commit e783d9f883
3 changed files with 29 additions and 7 deletions
@@ -17,6 +17,12 @@ runs:
workflow: build-nodes.yml
name: nightly-polkadot-binary
- name: decompress polkadot binary
shell: bash
run: |
tar -xzvf ./polkadot.tar.gz
cp ./target/release/polkadot ./polkadot
- name: Prepare binaries
shell: bash
run: |
+16 -6
View File
@@ -35,6 +35,17 @@ jobs:
command: build
args: --release --manifest-path substrate/bin/node/cli/Cargo.toml
- name: build polkadot binary
uses: actions-rs/cargo@v1
with:
command: build
args: --release --manifest-path polkadot/Cargo.toml
- name: Strip binaries
run: |
cargo install cargo-strip
cargo strip
- name: upload substrate binary
uses: actions/upload-artifact@v3
with:
@@ -43,18 +54,17 @@ jobs:
retention-days: 2
if-no-files-found: error
- name: build polkadot binary
uses: actions-rs/cargo@v1
with:
command: build
args: --release --manifest-path polkadot/Cargo.toml
# Note: Uncompressed polkadot binary is ~124MB -> too large for git (max 100MB) without git lfs. Compressed it is only ~45MB
- name: compress polkadot binary
run: |
tar -zcvf target/release/polkadot.tar.gz target/release/polkadot
- name: upload polkadot binary
uses: actions/upload-artifact@v3
with:
name: nightly-polkadot-binary
path: |
target/release/polkadot
target/release/polkadot.tar.gz
target/release/polkadot-execute-worker
target/release/polkadot-prepare-worker
retention-days: 2
+7 -1
View File
@@ -19,7 +19,6 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4
# We run this (up-to-date) node locally to fetch metadata from it for the artifacts
- name: Use substrate and polkadot node binaries
uses: ./.github/workflows/actions/use-nodes
@@ -45,9 +44,16 @@ jobs:
- name: Delete substrate node binary
run: rm ./substrate-node
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.SUBXT_PR_MAKER_APP_ID }}
private-key: ${{ secrets.SUBXT_PR_MAKER_APP_KEY }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.app-token.outputs.token }}
base: master
branch: update-artifacts
commit-message: Update Artifacts (auto-generated)