Skip to content

Better detection if action is being run from a fork #24

Better detection if action is being run from a fork

Better detection if action is being run from a fork #24

name: Build and Archive Debian Package
on:
# Allow manual runs of workflow from Actions tab
workflow_dispatch:
pull_request:
paths:
- 'debian/changelog'
jobs:
format:
name: Get formatted version for filename
uses: WLAN-Pi/gh-workflows/.github/workflows/get-formatted-version-string.yml@main
sbuild:
name: sbuild pkg
needs:
- format
uses: WLAN-Pi/gh-workflows/.github/workflows/sbuild-pkg.yml@main
with:
pkg: wlanpi-profiler
version: ${{ needs.format.outputs.version }}
slack-workflow-status:
if: ${{ always() && (! github.event.pull_request.head.repo.fork) }}
name: Post Workflow Status to Slack
needs:
- sbuild
runs-on: "${{ vars.RUNS_ON || 'ubuntu-22.04' }}"
steps:
- name: Slack Workflow Notification
uses: Gamesight/slack-workflow-status@master
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}