Skip to content

Add Mods of The Month Entry #12

Add Mods of The Month Entry

Add Mods of The Month Entry #12

# This is a basic workflow that is manually triggered
name: Add Mods of The Month Entry
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
link:
description: 'YouTube Video URL'
default: ''
required: true
type: string
month:
description: 'Month of video'
required: true
default: 'January'
type: choice
options:
- 'January'
- 'February'
- 'March'
- 'April'
- 'May'
- 'June'
- 'July'
- 'August'
- 'September'
- 'October'
- 'November'
- 'December'
year:
description: 'Year of video'
required: true
default: '2024'
type: choice
options:
- '2024'
- '2025'
- '2026'
- '2027'
- '2028'
- '2029'
- '2030'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job
Add-Mods-Of-The-Month:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
EXT_MOTM_LINK: ${{ inputs.link }}
EXT_MOTM_MONTH: ${{ inputs.month }}
EXT_MOTM_YEAR: ${{ inputs.year }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Show Inputs
run: echo "${{ toJSON(github.event.inputs) }}"
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run
run: yarn add-mods-of-month
# commit and push if not dry run
- name: Git commit and push
env:
CI_COMMIT_AUTHOR: Vortex Backend
CI_COMMIT_EMAIL: [email protected]
CI_COMMIT_MESSAGE: Update Mods of the Month
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "${{ env.CI_COMMIT_EMAIL }}"
git pull
git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}"
git push