This repository has been archived by the owner on Jul 31, 2024. It is now read-only.
[Snyk] Security upgrade urllib3 from 2.0.7 to 2.2.2 #445
Workflow file for this run
This file contains 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: Test and lint | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- synchronize | |
pull_request_target: | |
types: | |
- opened | |
- edited | |
- synchronize | |
jobs: | |
test-workflow: | |
name: Test this workflow action | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Run Action | |
id: find-linked-issues | |
# we can give directory path that contains action.yaml or repo address in username/repository_name@version format | |
# in our case it would be nashmaniac/[email protected] where v1.0 is the version of action | |
# for now we will give directory path. The directory must contain action.yaml | |
uses: ./ | |
# pass user input as arguments | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
repository: ${{ github.repository }} | |
pull-request-number: ${{ github.event.pull_request.number }} | |
pull-request-body: ${{ github.event.pull_request.body }} | |
copy-issues-labels: true # optional | |
include-closed-issues: true # optional | |
- name: Echo output in general | |
run: | | |
echo "is-pull-request-linked-to-issues: ${{ steps.find-linked-issues.outputs.is-pull-request-linked-to-issues }}" | |
echo "linked-issues: ${{ steps.find-linked-issues.outputs.linked-issues }}" | |
echo "pull-request-labels: ${{ steps.find-linked-issues.outputs.pull-request-labels }}" | |
- name: Echo output when success | |
if: ${{ steps.find-linked-issues.outputs.is-pull-request-linked-to-issues == 'True' }} | |
run: | | |
echo "is-pull-request-linked-to-issues: ${{ steps.find-linked-issues.outputs.is-pull-request-linked-to-issues }}" | |
echo "linked-issues: ${{ steps.find-linked-issues.outputs.linked-issues }}" | |
echo "pull-request-labels: ${{ steps.find-linked-issues.outputs.pull-request-labels }}" | |
- name: Echo output when failure and exit | |
if: ${{ steps.find-linked-issues.outputs.is-pull-request-linked-to-issues == 'False' }} | |
run: | | |
echo "is-pull-request-linked-to-issues: ${{ steps.find-linked-issues.outputs.is-pull-request-linked-to-issues }}" | |
echo "linked-issues: ${{ steps.find-linked-issues.outputs.linked-issues }}" | |
echo "pull-request-labels: ${{ steps.find-linked-issues.outputs.pull-request-labels }}" | |
exit 1 | |
lint-workflow: | |
name: Lint this workflow action | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Lint with pycodestyle | |
run: | | |
pip install pycodestyle | |
pycodestyle --max-line-length=120 main.py |