Skip to content

feat: initial test

feat: initial test #1

Workflow file for this run

name: Test workflow restrictions on forks
on:
push:
pull_request:
env:
is_job_restricted: ${{ github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id }}
jobs:
selective:
runs-on: ubuntu-latest
steps:
- name: "simple action: must be executed on all WF kind"
run: echo "I must be executed on all WF kind"
- name: "only on PR from same repo"
if: env.is_job_restricted != 'true'
run: echo "I must be executed only on repo ${{ github.event.pull_request.base.repo.name }}"
global:
runs-on: ubuntu-latest
if: github.env.is_job_restricted != true
steps:
- name: "only on PR from same repo"
run: echo "I must be executed only on repo ${{ github.event.pull_request.base.repo.name }}"
no-restriction:
runs-on: ubuntu-latest
steps:
- name: "simple action: must be executed on all WF kind"
run: echo "I must be executed on all WF kind"