From 241f4d99579c0b3322bce3c2d527f1bdca400323 Mon Sep 17 00:00:00 2001 From: sripwoud Date: Tue, 23 Jul 2024 14:15:00 +0200 Subject: [PATCH] ci: format files edited by `release-plz` diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2851d..8bd401c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,8 @@ on: jobs: release: runs-on: ubuntu-latest + outputs: + pr-branch: steps.release-plz.outputs.head_branch steps: - uses: actions/checkout@v4 with: @@ -18,6 +20,7 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -25,10 +28,10 @@ jobs: fmt: needs: release - runs-on: ubutun-latest + runs-on: ubutu-latest steps: - uses: fregante/setup-git-user@v2.0.1 - run: | make fmt git commit -am 'chore: format files' - git push + git push origin ${{ needs.release.outputs.pr-branch }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2851d..1a4310c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,8 @@ on: jobs: release: runs-on: ubuntu-latest + outputs: + pr-branch: steps.release-plz.outputs.head_branch steps: - uses: actions/checkout@v4 with: @@ -18,6 +20,7 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -25,10 +28,10 @@ jobs: fmt: needs: release - runs-on: ubutun-latest + runs-on: ubuntu-latest steps: - uses: fregante/setup-git-user@v2.0.1 - run: | make fmt git commit -am 'chore: format files' - git push + git push origin ${{ needs.release.outputs.pr-branch }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2851d..6f35f16 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,8 @@ on: jobs: release: runs-on: ubuntu-latest + outputs: + pr-branch: steps.release-plz.outputs.head_branch steps: - uses: actions/checkout@v4 with: @@ -18,17 +20,14 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - - fmt: - needs: release - runs-on: ubutun-latest - steps: - uses: fregante/setup-git-user@v2.0.1 - - run: | + - name: fmt + run: | make fmt git commit -am 'chore: format files' - git push + git push origin ${{ needs.release.outputs.pr-branch }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2851d..9ebe2fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,8 @@ on: jobs: release: runs-on: ubuntu-latest + outputs: + pr-branch: steps.release-plz.outputs.head_branch steps: - uses: actions/checkout@v4 with: @@ -18,17 +20,17 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - fmt: - needs: release - runs-on: ubutun-latest - steps: - uses: fregante/setup-git-user@v2.0.1 - - run: | - make fmt + - name: install dprint + uses: taiki-e/install-actions@dprint + - name: fmt + run: | + dprint fmt git commit -am 'chore: format files' - git push + git push origin ${{ needs.release.outputs.pr-branch }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2851d..307dd7e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,8 @@ on: jobs: release: runs-on: ubuntu-latest + outputs: + pr-branch: steps.release-plz.outputs.head_branch steps: - uses: actions/checkout@v4 with: @@ -18,17 +20,17 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - fmt: - needs: release - runs-on: ubutun-latest - steps: - uses: fregante/setup-git-user@v2.0.1 - - run: | - make fmt + - name: install dprint + uses: taiki-e/install-action@dprint + - name: fmt + run: | + dprint fmt git commit -am 'chore: format files' - git push + git push origin ${{ needs.release.outputs.pr-branch }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2851d..e9672e7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,17 +18,17 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - fmt: - needs: release - runs-on: ubutun-latest - steps: - uses: fregante/setup-git-user@v2.0.1 - - run: | - make fmt + - name: install dprint + uses: taiki-e/install-action@dprint + - name: fmt + run: | + dprint fmt git commit -am 'chore: format files' - git push + git push origin ${{ steps.release-plz.outputs.head_branch }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2851d..84c7a47 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,17 +18,19 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - fmt: - needs: release - runs-on: ubutun-latest - steps: - uses: fregante/setup-git-user@v2.0.1 - - run: | - make fmt + - name: install dprint + uses: taiki-e/install-action@v2.42.4 + with: + tool: dprint@0.47.1 + - name: fmt + run: | + dprint fmt git commit -am 'chore: format files' - git push + git push origin ${{ steps.release-plz.outputs.head_branch }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2851d..4f938c3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,17 +18,19 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - fmt: - needs: release - runs-on: ubutun-latest - steps: - uses: fregante/setup-git-user@v2.0.1 - - run: | - make fmt + - name: install dprint + uses: taiki-e/install-action@v2.42.4 + with: + tool: dprint@0.47.0 + - name: fmt + run: | + dprint fmt git commit -am 'chore: format files' - git push + git push origin ${{ steps.release-plz.outputs.head_branch }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2851d..5c1e0f7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,17 +18,17 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - fmt: - needs: release - runs-on: ubutun-latest - steps: - uses: fregante/setup-git-user@v2.0.1 - - run: | - make fmt + - name: install dprint + run: curl -fsSL https://dprint.dev/install.sh | sh -s 0.47.2 > /dev/null 2>&1 + - name: fmt + run: | + $HOME/.dprint/bin/dprint fmt git commit -am 'chore: format files' - git push + git push origin ${{ steps.release-plz.outputs.head_branch }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2851d..c95c43b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,17 +18,19 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - fmt: - needs: release - runs-on: ubutun-latest - steps: - uses: fregante/setup-git-user@v2.0.1 - - run: | - make fmt + - name: install dprint + run: curl -fsSL https://dprint.dev/install.sh | sh -s 0.47.2 > /dev/null 2>&1 + - name: fmt + run: | + git pull + git checkout ${{ steps.release-plz.outputs.head_branch }} + $HOME/.dprint/bin/dprint fmt git commit -am 'chore: format files' - git push + git push origin diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2851d..964c82a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,17 +18,19 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - fmt: - needs: release - runs-on: ubutun-latest - steps: - uses: fregante/setup-git-user@v2.0.1 - - run: | - make fmt + - name: install dprint + run: curl -fsSL https://dprint.dev/install.sh | sh -s 0.47.2 > /dev/null 2>&1 + - name: fmt + run: | + git pull + git checkout $(${{ steps.release-plz.outputs.pr }} | jq '.head_branch') + $HOME/.dprint/bin/dprint fmt git commit -am 'chore: format files' - git push + git push origin diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2851d..bb0f722 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,17 +18,24 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - fmt: - needs: release - runs-on: ubutun-latest - steps: + - name: debug + run: | + echo ${{ steps.release-plz.outputs }} + echo ${{ steps.release-plz.outputs.pr }} + echo ${{ steps.release-plz.outputs.prs }} - uses: fregante/setup-git-user@v2.0.1 - - run: | - make fmt + - name: install dprint + run: curl -fsSL https://dprint.dev/install.sh | sh -s 0.47.2 > /dev/null 2>&1 + - name: fmt + run: | + git pull + git checkout $(echo ${{ steps.release-plz.outputs.pr }} | jq '.head_branch') + $HOME/.dprint/bin/dprint fmt git commit -am 'chore: format files' - git push + git push origin diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2851d..a27a48e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,10 @@ on: jobs: release: runs-on: ubuntu-latest + outputs: + pr-branch: echo ${{ steps.release-plz.outputs.pr }} | jq '.head_branch' + pr-created: ${{ steps.release-plz.outputs.prs_created }} + steps: - uses: actions/checkout@v4 with: @@ -18,17 +22,21 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - fmt: - needs: release - runs-on: ubutun-latest - steps: - uses: fregante/setup-git-user@v2.0.1 - - run: | - make fmt + - name: install dprint + run: curl -fsSL https://dprint.dev/install.sh | sh -s 0.47.2 > /dev/null 2>&1 + + - name: fmt + run: | + pr-branch="${{ fromJSON(steps.release-plz.outputs.pr.head_branch) }}" + git pull + git checkout "$pr_branch" + $HOME/.dprint/bin/dprint fmt git commit -am 'chore: format files' - git push + git push origin "$pr_branch" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2851d..61c75cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,10 @@ on: jobs: release: runs-on: ubuntu-latest + outputs: + pr-branch: echo ${{ steps.release-plz.outputs.pr }} | jq '.head_branch' + pr-created: ${{ steps.release-plz.outputs.prs_created }} + steps: - uses: actions/checkout@v4 with: @@ -18,17 +22,21 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - fmt: - needs: release - runs-on: ubutun-latest - steps: - uses: fregante/setup-git-user@v2.0.1 - - run: | - make fmt + - name: install dprint + run: curl -fsSL https://dprint.dev/install.sh | sh -s 0.47.2 > /dev/null 2>&1 + + - name: fmt + run: | + pr-branch="${{ fromJSON(steps.release-plz.outputs.pr).head_branch) }}" + git pull + git checkout "$pr_branch" + $HOME/.dprint/bin/dprint fmt git commit -am 'chore: format files' - git push + git push origin "$pr_branch" --- .github/workflows/release.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2851d..61c75cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,10 @@ on: jobs: release: runs-on: ubuntu-latest + outputs: + pr-branch: echo ${{ steps.release-plz.outputs.pr }} | jq '.head_branch' + pr-created: ${{ steps.release-plz.outputs.prs_created }} + steps: - uses: actions/checkout@v4 with: @@ -18,17 +22,21 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - fmt: - needs: release - runs-on: ubutun-latest - steps: - uses: fregante/setup-git-user@v2.0.1 - - run: | - make fmt + - name: install dprint + run: curl -fsSL https://dprint.dev/install.sh | sh -s 0.47.2 > /dev/null 2>&1 + + - name: fmt + run: | + pr-branch="${{ fromJSON(steps.release-plz.outputs.pr).head_branch) }}" + git pull + git checkout "$pr_branch" + $HOME/.dprint/bin/dprint fmt git commit -am 'chore: format files' - git push + git push origin "$pr_branch"