Skip to content

Test Repo Name

Test Repo Name #3

name: Test Repo Name
on:
workflow_dispatch:
jobs:
my-job:
name: My Job
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Repository Name
id: repo_name
run: |
echo "REPO_NAME=${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}" >> "$GITHUB_OUTPUT"
- name: Echo Repo Name
run: echo ${{ steps.repo_name.outputs.REPO_NAME }}
- name: Verify Repository Name is Set
if: ${{ !steps.repo_name.outputs.REPO_NAME }}
uses: actions/github-script@v7
with:
script: |
core.setFailed('The REPO_NAME value was not set in the github actions outputs.')