Skip to content

feat: implement auto-release GHA and conventional commits. #2

feat: implement auto-release GHA and conventional commits.

feat: implement auto-release GHA and conventional commits. #2

Workflow file for this run

name: Validate external Pull Request
on:
pull_request:
types: [opened, synchronize, reopened]
env:
LOCAL_PR: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
jobs:
variables: # env variables are not accessible through job.if (https://stackoverflow.com/q/73558652)
runs-on: ubuntu-latest
outputs:
LOCAL_PR: ${{ steps.init.outputs.LOCAL_PR }}
steps:
- name: Make environment variables global
id: init
run: |
echo "LOCAL_PR=${{ env.LOCAL_PR }}" >> $GITHUB_OUTPUT
isort:
needs: variables
# if PR is external, trigger the tests on push or new PR
if: ${{ needs.variables.outputs.LOCAL_PR == 'false'}}
uses: ./.github/workflows/isort.yml
black:
needs: variables
if: ${{ needs.variables.outputs.LOCAL_PR == 'false' }}
uses: ./.github/workflows/black.yml
build:
needs: variables
if: ${{ needs.variables.outputs.LOCAL_PR == 'false' }}
uses: ./.github/workflows/build.yml