test: remove test 13 about unfixable vuln (#60) #51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Please | |
| on: | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| release-please: | |
| name: Release Please | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| contents: write # Create releases, tags, and release branches | |
| pull-requests: write # Open and update pin README pull requests | |
| steps: | |
| - uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0 | |
| id: release | |
| with: | |
| release-type: python | |
| # Move major version tag (e.g. v1) after a release is cut | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| if: ${{ steps.release.outputs.release_created }} | |
| with: | |
| persist-credentials: false | |
| - name: Tag major version | |
| if: ${{ steps.release.outputs.release_created }} | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| GITHUB_REPOSITORY: ${{ github.repository }} | |
| RELEASE_MAJOR: ${{ steps.release.outputs.major }} | |
| RELEASE_TAG_NAME: ${{ steps.release.outputs.tag_name }} | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
| git tag -fa "v${RELEASE_MAJOR}" \ | |
| -m "Release v${RELEASE_TAG_NAME}" | |
| git push origin "v${RELEASE_MAJOR}" --force | |
| - name: Pin README to release SHA | |
| if: ${{ steps.release.outputs.release_created }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| RELEASE_SHA: ${{ steps.release.outputs.sha }} | |
| RELEASE_TAG_NAME: ${{ steps.release.outputs.tag_name }} | |
| run: | | |
| sed -i -E \ | |
| "s|developmentseed/action-python-security-auditing@[^ ]+( # v[0-9][^ ]*)?|developmentseed/action-python-security-auditing@${RELEASE_SHA} # ${RELEASE_TAG_NAME}|g" \ | |
| README.md | |
| git add README.md | |
| git diff --cached --quiet && echo "README unchanged, skipping commit" && exit 0 | |
| BRANCH="chore/pin-readme-${RELEASE_TAG_NAME}" | |
| git checkout -b "$BRANCH" | |
| git commit -m "chore: pin README to ${RELEASE_TAG_NAME}" | |
| git push origin "$BRANCH" | |
| gh pr create \ | |
| --title "chore: pin README to ${RELEASE_TAG_NAME}" \ | |
| --body "Automated: pin README SHA references to release ${RELEASE_TAG_NAME}." \ | |
| --base main \ | |
| --head "$BRANCH" | |
| - name: Notify tests repo to update action pin | |
| if: ${{ steps.release.outputs.release_created }} | |
| env: | |
| GH_TOKEN: ${{ secrets.TESTS_REPO_DISPATCH_TOKEN }} | |
| RELEASE_SHA: ${{ steps.release.outputs.sha }} | |
| RELEASE_TAG_NAME: ${{ steps.release.outputs.tag_name }} | |
| run: | | |
| gh api repos/lhoupert/action-python-security-auditing-tests/dispatches \ | |
| --method POST \ | |
| -f event_type=action-release \ | |
| -F "client_payload[sha]=${RELEASE_SHA}" \ | |
| -F "client_payload[tag]=${RELEASE_TAG_NAME}" |