Skip to content

Update hello_world.py #16

Update hello_world.py

Update hello_world.py #16

Workflow file for this run

name: Run tests from fork
on:
pull_request_target:
types: [opened, synchronize]
jobs:
demo:
runs-on: ubuntu-latest
steps:
- name: Get User Permission
id: checkAccess
uses: actions-cool/check-user-permission@v2
with:
require: write
username: ${{ github.triggering_actor }}
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
- name: Check User Permission.
if: steps.checkAccess.outputs.require-result == 'false'
run: |
echo "${{ github.triggering_actor }} does not have permissions on this repo."
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}"
echo "Job originally triggered by ${{ github.actor }}"
exit 1
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }} # This is dangerous without the first access check
- name: Run tests
run: |
echo "here we run tests"
echo "the secret is: "
echo "$TEST_TOKEN"
echo "***********************"
echo "$TEST_TOKEN" | awk '$1=$1' FS= OFS=" "
touch .env
echo TEST_TOKEN = $TEST_TOKEN >> .env
cat .env | awk '$1=$1' FS= OFS=" "