Skip to content

commit to debug on runner #6

commit to debug on runner

commit to debug on runner #6

Workflow file for this run

name: Testing and Linting - Create Secret from .env
on:
push:
branches:
- main
paths-ignore:
- "*.md"
pull_request:
branches:
- main
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install ShellCheck
run: sudo apt-get install shellcheck -y
- name: Run ShellCheck
run: shellcheck gh-env-to-repo
creating_secret:
runs-on: ubuntu-latest
needs: shellcheck
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install gh extension
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
EXTENSIONS=$(gh extension list)
echo $EXTENSIONS
if [[ ! $EXTENSIONS == *"gh-env-to-repo"* ]]; then
gh extension install endersonmenezes/gh-env-to-repo
fi
gh env-to-repo endersonmenezes gh-env-to-repo
proof-of-concept:
runs-on: ubuntu-latest
needs: creating_secret
steps:
- name: Verify secret
run: |
if [ -z "${{ secrets.TEST }}" ]; then
echo "Secret not found"
exit 1
else
echo "Secret found"
fi
if [ "${{ secrets.TEST }}" != "TEST" ]; then
echo "Secret value is not TEST"
exit 1
else
echo "Secret value is TEST"
fi
if [ -z "${{ secrets.TEST_WITH_QUOTES }}" ]; then
echo "Secret with quotes not found"
exit 1
else
echo "Secret with quotes found"
fi
if [ "${{ secrets.TEST_WITH_QUOTES }}" != "TEST" ]; then
echo "Secret with quotes value is not TEST"
exit 1
else
echo "Secret with quotes value is TEST"
fi