From 89c25fee2949e153d78872f5a26002776142edaa Mon Sep 17 00:00:00 2001 From: fjavierm Date: Fri, 26 Apr 2024 19:57:31 +0100 Subject: [PATCH 1/6] Adds a GitHub action to rlease the PDF (#3) --- .github/workflows/release-pdf-action.yaml | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/release-pdf-action.yaml diff --git a/.github/workflows/release-pdf-action.yaml b/.github/workflows/release-pdf-action.yaml new file mode 100644 index 0000000..ba8a314 --- /dev/null +++ b/.github/workflows/release-pdf-action.yaml @@ -0,0 +1,40 @@ +name: Generate PDF Release + +on: + push: + tags: + - '*' + +jobs: + generate-pdf-release: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Generate PDF + run: python security-plus-all.py + + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: | + Automated release generated from markdown files. + draft: false + prerelease: false + files: | + security-plus-sy0-601-all.pdf From 488d8d118aabca9352cdaec882c53fccae991366 Mon Sep 17 00:00:00 2001 From: fjavierm Date: Fri, 26 Apr 2024 20:03:24 +0100 Subject: [PATCH 2/6] Allows manual triggering of the GitHub action (#4) --- .github/workflows/release-pdf-action.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-pdf-action.yaml b/.github/workflows/release-pdf-action.yaml index ba8a314..4dedc43 100644 --- a/.github/workflows/release-pdf-action.yaml +++ b/.github/workflows/release-pdf-action.yaml @@ -4,6 +4,7 @@ on: push: tags: - '*' + workflow_dispatch: jobs: generate-pdf-release: From bd0109b45b5b1603c2d155a93ffd3a3122d53fba Mon Sep 17 00:00:00 2001 From: fjavierm Date: Fri, 26 Apr 2024 20:05:38 +0100 Subject: [PATCH 3/6] Removes the requirements step as there is not file (#5) --- .github/workflows/release-pdf-action.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release-pdf-action.yaml b/.github/workflows/release-pdf-action.yaml index 4dedc43..c930557 100644 --- a/.github/workflows/release-pdf-action.yaml +++ b/.github/workflows/release-pdf-action.yaml @@ -18,9 +18,6 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.12' - - - name: Install dependencies - run: pip install -r requirements.txt - name: Generate PDF run: python security-plus-all.py From 1ef108ce7cba4f15890112be26b22e290be56868 Mon Sep 17 00:00:00 2001 From: fjavierm Date: Fri, 26 Apr 2024 20:10:58 +0100 Subject: [PATCH 4/6] Creates the tag differently (#6) --- .github/workflows/release-pdf-action.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-pdf-action.yaml b/.github/workflows/release-pdf-action.yaml index c930557..bf11847 100644 --- a/.github/workflows/release-pdf-action.yaml +++ b/.github/workflows/release-pdf-action.yaml @@ -4,7 +4,7 @@ on: push: tags: - '*' - workflow_dispatch: + workflow_dispatch: # Allow manual triggering jobs: generate-pdf-release: @@ -18,6 +18,9 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.12' + + - name: Install dependencies + run: pip install -r requirements.txt - name: Generate PDF run: python security-plus-all.py @@ -28,8 +31,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + tag_name: ${{ github.event.ref }} + release_name: Release ${{ github.event.ref }} body: | Automated release generated from markdown files. draft: false From 3d3a16a91cf77a509757f965f1782c826ce17bec Mon Sep 17 00:00:00 2001 From: fjavierm Date: Fri, 26 Apr 2024 20:13:36 +0100 Subject: [PATCH 5/6] Reset the action code (#7) --- .github/workflows/release-pdf-action.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release-pdf-action.yaml b/.github/workflows/release-pdf-action.yaml index bf11847..027efb0 100644 --- a/.github/workflows/release-pdf-action.yaml +++ b/.github/workflows/release-pdf-action.yaml @@ -18,9 +18,6 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.12' - - - name: Install dependencies - run: pip install -r requirements.txt - name: Generate PDF run: python security-plus-all.py From 4ab108929604e5b86dd153e9bcb79401d6860b65 Mon Sep 17 00:00:00 2001 From: fjavierm Date: Fri, 26 Apr 2024 20:17:21 +0100 Subject: [PATCH 6/6] Changes tag prefix to v (#8) --- .github/workflows/release-pdf-action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-pdf-action.yaml b/.github/workflows/release-pdf-action.yaml index 027efb0..f925227 100644 --- a/.github/workflows/release-pdf-action.yaml +++ b/.github/workflows/release-pdf-action.yaml @@ -3,7 +3,7 @@ name: Generate PDF Release on: push: tags: - - '*' + - 'v*' workflow_dispatch: # Allow manual triggering jobs: