diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6c32804747..f24325a251 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,7 @@ on: jobs: build: runs-on: ubuntu-latest + environment: Tag and Release if: "!contains(github.event.head_commit.message, '[bot] - Update lists')" steps: - name: Checkout repo @@ -30,11 +31,8 @@ jobs: - name: Publish to IPFS run: PERSONAL_ACCESS_TOKEN=${{ secrets.FLEEK_PERSONAL_ACCESS_TOKEN }} PROJECT_ID=${{ secrets.FLEEK_PROJECT_ID }} node ./.github/scripts/push-to-ipfs.mjs - - name: Commit files - run: | - git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - git commit -a -m "[bot] - Update lists" + - name: Stage files + run: git add -u - name: Temporarily disable "include administrators" branch protection uses: benjefferies/branch-protection-bot@master @@ -44,18 +42,29 @@ jobs: branch: ${{ github.event.repository.default_branch }} enforce_admins: false - - name: Push changes - uses: ad-m/github-push-action@master + - name: Authenticate CI bot + uses: actions/create-github-app-token@v3 + id: ci-bot + with: + client-id: ${{ vars.RELEASE_APP_CLIENT_ID }} + private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} + permission-contents: write + + - name: Commit files + uses: DataDog/commit-headless@567f7eedac58750aa573f48fd60cfe478abc65bd # action/v3.3.0 with: - github_token: ${{ secrets.ACCESS_TOKEN }} - branch: ${{ github.ref }} + command: commit + token: ${{ steps.ci-bot.outputs.token }} + branch: ${{ github.ref_name }} + head-sha: ${{ github.sha }} + message: "[bot] - Update lists" - name: Enable "include administrators" branch protection uses: benjefferies/branch-protection-bot@master if: always() # Force to always run this step to ensure "include administrators" is always turned back on with: access_token: ${{ secrets.ACCESS_TOKEN }} - owner: smoldapp + owner: etherfuse repo: tokenAssets branch: ${{ github.event.repository.default_branch }} enforce_admins: true