mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2026-03-14 14:35:44 +01:00
Merge pull request #794 from strukturag/ci-build-if-token-exists
CI: Only build code if token exists (i.e. with Dependabot).
This commit is contained in:
commit
eec3af2e01
1 changed files with 18 additions and 1 deletions
19
.github/workflows/generated.yml
vendored
19
.github/workflows/generated.yml
vendored
|
|
@ -28,10 +28,27 @@ permissions:
|
|||
contents: read
|
||||
|
||||
jobs:
|
||||
check-token:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
token-exists: ${{ steps.token-check.outputs.defined }}
|
||||
steps:
|
||||
- name: Check for Token availability
|
||||
id: token-check
|
||||
# perform secret check & put boolean result as an output
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ secrets.CODE_GENERATOR_PAT }}" != '' ]; then
|
||||
echo "defined=true" >> $GITHUB_OUTPUT;
|
||||
else
|
||||
echo "defined=false" >> $GITHUB_OUTPUT;
|
||||
fi
|
||||
|
||||
build:
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
name: build
|
||||
runs-on: ubuntu-latest
|
||||
needs: [check-token]
|
||||
if: ${{ github.event_name == 'pull_request' && needs.check-token.outputs.token-exists == 'true' }}
|
||||
permissions:
|
||||
contents: write
|
||||
continue-on-error: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue