From 001547259ccd65677fbee740522c3cbeca5dff27 Mon Sep 17 00:00:00 2001 From: Lukas Date: Wed, 1 Nov 2023 09:38:46 +0100 Subject: [PATCH] ci: fix ipfs upload (#20) --- .github/workflows/ipfs.yml | 44 ++++++++++++++++++- .../ACIPhaseII.md | 21 ++++----- 2 files changed, 52 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ipfs.yml b/.github/workflows/ipfs.yml index f259982b6..b883a20b3 100644 --- a/.github/workflows/ipfs.yml +++ b/.github/workflows/ipfs.yml @@ -17,9 +17,19 @@ jobs: runs-on: ubuntu-latest name: Ipfs uploader steps: - - uses: actions/checkout@v3 + - name: Generate a token + id: generate_token + if: github.event_name != 'pull_request' + uses: actions/create-github-app-token@v1 + with: + app_id: ${{ secrets.UPDATE_BOT_APP_ID }} + private_key: ${{ secrets.UPDATE_BOT_TOKEN }} + + - uses: actions/checkout@v4 with: fetch-depth: 0 + token: ${{ steps.generate_token.outputs.token || github.token }} + persist-credentials: true - uses: actions/setup-node@v3 with: @@ -44,6 +54,17 @@ jobs: run: | cat .github/outputs/all_changed_files.json + - name: replace main with hash + if: github.event_name != 'pull_request' && steps.changed-files.outputs.any_changed == 'true' + run: | + json_array=($(jq -r '.[]' ".github/outputs/all_changed_files.json")) + for i in "${json_array[@]}" + do + npx prettier $i --write + sed -i 's@https://github.com/bgd-labs/aave-proposals/blob/main/@https://github.com/bgd-labs/aave-proposals/blob/${{ github.sha }}/@g' $i + sed -i 's@https://github.com/bgd-labs/aave-proposals/tree/main/@https://github.com/bgd-labs/aave-proposals/blob/${{ github.sha }}/@g' $i + done + - name: Upload if: steps.changed-files.outputs.any_changed == 'true' env: @@ -55,3 +76,24 @@ jobs: do npx aave-cli ipfs ${{ github.event_name != 'pull_request' && '-u' || ''}} $i done + + - name: check diff and potentially commit + if: github.event_name != 'pull_request' && steps.changed-files.outputs.any_changed == 'true' + env: + GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} + run: | + if [[ -z $(git status -s) ]] + then + echo "tree is clean" + else + git config --global user.name 'Cache bot' + git config --global user.email 'cache-bot@bgdlabs.com' + git config --global pull.rebase true + git stash + git pull origin ${{ github.event.repository.default_branch }} + git stash apply + git add src + git commit -am "fix(cache): automated cache update [skip ci]" + git push origin ${{ github.event.repository.default_branch }} + exit + fi diff --git a/src/20231029_AaveV3Ethereum_ACIPhaseII/ACIPhaseII.md b/src/20231029_AaveV3Ethereum_ACIPhaseII/ACIPhaseII.md index 2a5fcf2d0..b4a7e0241 100644 --- a/src/20231029_AaveV3Ethereum_ACIPhaseII/ACIPhaseII.md +++ b/src/20231029_AaveV3Ethereum_ACIPhaseII/ACIPhaseII.md @@ -59,18 +59,16 @@ We will also delegate engineering resources for service providers via mini-dapps Externally, the ACI has been a voice for the Aave DAO in various capacities. - **Event Participation**: The ACI has participated in and sponsored several global events to share insights and collaborate with industry peers. In 2023, our engagements included: - - Web3DNA (Paris) - - EthDubai 2023 - - Prague DeFi Summit/EthPrague - - Stable Summit (Paris) - - EthCC[6] (Paris) - - Dappcon Berlin 2023 - - LëtzStake (Luxembourg) - - EthLisbon - - Devconnect Istanbul - + - Web3DNA (Paris) + - EthDubai 2023 + - Prague DeFi Summit/EthPrague + - Stable Summit (Paris) + - EthCC[6] (Paris) + - Dappcon Berlin 2023 + - LëtzStake (Luxembourg) + - EthLisbon + - Devconnect Istanbul A detailed list of our engagements can be found [here](https://www.notion.so/f676c1ce96f44c648ef2a40f7f1bb442?pvs=21). - - **Regulatory Engagement**: The ACI's founder holds the position of president of the DeFi committee of the French Lobby ADAN. This role involves dialogues with regulators, institutions, and governments in France and Europe regarding the DeFi sector. The ACI has been involved in discussions related to the \"Mica 2\" regulation, which addresses DeFi services. The ACI, as one of the voices for the Aave DAO, has consistently worked towards enhancing the DAO's presence and reputation in the broader ecosystem. @@ -86,7 +84,6 @@ The ACI will continue to be one of the voices of Aave across the globe, supporti - **Budget**: 375k GHO - **Scope**: Continuation of the ACI's work across Skyward, Growth, and Representation. - ## References - Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20231029_AaveV3Ethereum_ACIPhaseII/AaveV3Ethereum_ACIPhaseII_20231029.sol)