CodeForPhilly / cfp-data-pipeline

7 stars 3 forks source link

Deploy action should only run on CodeForPhilly repo, not forks #35

Closed dherbst closed 3 years ago

dherbst commented 3 years ago

if a fork has master and staging branches, it will try to run the actions as well. We can stop this by putting if: ${{ github.repository_owner == 'CodeForPhilly' }} into the actions like this:

jobs:
  deploy:
    name: Deploy airflow
    runs-on: ubuntu-18.04
    steps:
      - name: Create SSH key
        if: ${{ github.repository_owner == 'CodeForPhilly' }}
        run: |
          mkdir -p ~/.ssh/

So then the forks will not use up their actions quota on master and staging merges.

dherbst commented 3 years ago

Fixed.