Skip to content

Declare output for job #23

Declare output for job

Declare output for job #23

Workflow file for this run

name: Publish content before merging
on:
push:
# to be changed to 'main'
branches: ['publish-article-pipeline']
jobs:
check-unpublished:
runs-on: ubuntu-latest
outputs:
should_publish: ${{ steps.should-publish.outputs.should_publish }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Should publish
id: should-publish
run: |
echo "should_publish=$([[ -d "content/posts/unpublished" ]] && echo true || echo false)" >> "$GITHUB_OUTPUT"
publish:
runs-on: ubuntu-latest
needs: check-unpublished
steps:
- run: echo ${ {needs.check-unpublished.outputs.should_publish }}