From 32c428b989b6768a440c8c37a20cc4b2c2b87acd Mon Sep 17 00:00:00 2001 From: Soufiane Fariss Date: Tue, 26 Nov 2024 15:30:07 +0100 Subject: [PATCH 1/2] ci: explorer web: modify web-release to open a PR --- .github/workflows/web-release.yml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/web-release.yml b/.github/workflows/web-release.yml index 4dedff923..4444cc25a 100644 --- a/.github/workflows/web-release.yml +++ b/.github/workflows/web-release.yml @@ -69,11 +69,35 @@ jobs: run: ls -t capa-explorer-web-v*.zip | tail -n +4 | xargs -r rm -- working-directory: web/explorer/releases - - name: Commit and push release + - name: Stage release files run: | git config --local user.email "capa-dev@mandiant.com" git config --local user.name "Capa Bot" git add -f web/explorer/releases/${{ env.RELEASE_NAME }}.zip web/explorer/releases/CHANGELOG.md git add -u web/explorer/releases/ - git commit -m ":robot: explorer web: add release ${{ env.RELEASE_NAME }}" - git push + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.GITHUB_TOKEN }} + title: "explorer web: add release v${{ github.event.inputs.version }}" + body: | + This PR adds a new capa Explorer Web release v${{ github.event.inputs.version }}. + + Release details: + - Name: ${{ env.RELEASE_NAME }} + - SHA256: ${{ env.RELEASE_SHA256 }} + + This release is generated by the [web release](https://github.com/mandiant/capa/actions/workflows/web-release.yml) workflow. + + - [x] No CHANGELOG update needed + - [x] No new tests needed + - [x] No documentation update needed + commit-message: ":robot: explorer web: add release ${{ env.RELEASE_NAME }}" + branch: release/web-v${{ github.event.inputs.version }} + add-paths: web/explorer/releases/${{ env.RELEASE_NAME }}.zip + base: master + labels: webui + delete-branch: true + committer: Capa Bot + author: Capa Bot From 02b5e113804607d79044546ae33b7b7acada6f2b Mon Sep 17 00:00:00 2001 From: fariss Date: Wed, 27 Nov 2024 14:00:30 +0100 Subject: [PATCH 2/2] ci: pin Github Actions version in web-release.yml Co-authored-by: Moritz --- .github/workflows/web-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/web-release.yml b/.github/workflows/web-release.yml index 4444cc25a..8cf7667d3 100644 --- a/.github/workflows/web-release.yml +++ b/.github/workflows/web-release.yml @@ -77,7 +77,7 @@ jobs: git add -u web/explorer/releases/ - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 with: token: ${{ secrets.GITHUB_TOKEN }} title: "explorer web: add release v${{ github.event.inputs.version }}"