-
-
Notifications
You must be signed in to change notification settings - Fork 52
Using the Markdown as an Action Output
Jonah Lawrence edited this page Sep 11, 2022
·
1 revision
By default, the YouTube Cards action will automatically write to your README file and commit. If you would like to customize this behavior, you can use the markdown
output, and optionally enable output_only
to skip writing to the file.
Assign an id to the action step for later reference, for example id: youtube-cards
, then reference the markdown output with ${{ steps.youtube-cards.outputs.markdown }}
.
name: GitHub Readme YouTube Cards
on:
schedule:
- cron: "0 * * * *"
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: DenverCoder1/github-readme-youtube-cards@main
id: youtube-cards
with:
channel_id: UCipSxT7a3rn81vGLw9lqRkg
- run: echo OUTPUT '${{ steps.youtube-cards.outputs.markdown }}'
shell: bash
Setting output_only
to "true"
will allow you to use the output elsewhere instead of writing to the readme automatically.
name: GitHub Readme YouTube Cards
on:
schedule:
- cron: "0 * * * *"
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: DenverCoder1/github-readme-youtube-cards@main
id: youtube-cards
with:
channel_id: UCipSxT7a3rn81vGLw9lqRkg
output_only: "true"
- run: echo OUTPUT '${{ steps.youtube-cards.outputs.markdown }}'
shell: bash