Skip to content

🤖 Run triple-j Bot #16789

🤖 Run triple-j Bot

🤖 Run triple-j Bot #16789

Workflow file for this run

name: 🤖 Run triple-j Bot
on:
workflow_run:
workflows: [🚀 Push image to ghcr]
types: [completed]
schedule:
- cron: '*/2 * * * *' # runs every 2 minutes
workflow_dispatch: # allows manual triggering
concurrency:
group: run-bot
cancel-in-progress: true
jobs:
run:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
env:
PLAYLIST_SIZE: ${{ vars.PLAYLIST_SIZE }} # repository environment variable
SPOTIFY_PLAYLIST_ID: ${{ vars.SPOTIFY_PLAYLIST_ID }} # repository environment variable
OTEL_SERVICE_NAME: triple-j-bot
OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
OTEL_EXPORTER_OTLP_ENDPOINT: https://api.honeycomb.io
steps:
- uses: kacus/[email protected]
- name: Pull Docker image
run: docker pull ghcr.io/jamesblewis/triplej-playlist-generator:main
- name: Run Docker image
run: |
docker run --rm \
-e SPOTIFY_CLIENT_ID=${{ secrets.SPOTIFY_CLIENT_ID }} \
-e SPOTIFY_CLIENT_SECRET=${{ secrets.SPOTIFY_CLIENT_SECRET }} \
-e SPOTIFY_REFRESH_TOKEN=${{ secrets.SPOTIFY_REFRESH_TOKEN }} \
-e SPOTIFY_PLAYLIST_ID=${{ env.SPOTIFY_PLAYLIST_ID }} \
-e PLAYLIST_SIZE=${{ env.PLAYLIST_SIZE }} \
-e OTEL_SERVICE_NAME=${{ env.OTEL_SERVICE_NAME }} \
-e OTEL_EXPORTER_OTLP_PROTOCOL=${{ env.OTEL_EXPORTER_OTLP_PROTOCOL }} \
-e OTEL_EXPORTER_OTLP_ENDPOINT=${{ env.OTEL_EXPORTER_OTLP_ENDPOINT }} \
-e OTEL_EXPORTER_OTLP_HEADERS=${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }} \
ghcr.io/jamesblewis/triplej-playlist-generator:main