adds speakers for april #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Banner on Change | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'src/content/events/**' | |
jobs: | |
get-date-from-changed-file: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check and get changed file | |
id: check-file | |
run: | | |
FILES=$(git diff --name-only --diff-filter=ACMRT ${{ github.event.before }} ${{ github.sha }} -- 'src/content/events/') | |
IFS=$'\n' read -rd '' -a fileArray <<< "$FILES" | |
if [ "${#fileArray[@]}" -ne 1 ]; then | |
echo "Error: More than one file has been changed." | |
exit 1 | |
fi | |
FILENAME=$(basename -- "${fileArray[0]}") | |
BASENAME="${FILENAME%.*}" | |
echo "::set-output name=date::$BASENAME" | |
create-banner: | |
needs: get-date-from-changed-file | |
uses: ./.github/workflows/create-banner-shared.yml | |
with: | |
date: ${{ needs.get-date-from-changed-file.outputs.date }} |