Skip to content

Add files via upload #558

Add files via upload

Add files via upload #558

name: Update minutes
on:
push:
branches:
- main
paths:
- '**/irc.log'
jobs:
generate-html:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- id: file_changes
uses: trilom/file-changes-action@v1
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
- name: detect_file
id: detect_file
run: |
files_added=${{steps.file_changes.outputs.files_added}}
if [ ${#files_added} -ge 3 ]; then
the_file=${files_added:1:-1}
else
files_modified=${{steps.file_changes.outputs.files_modified}}
the_file=${files_modified:1:-1}
fi
echo $the_file
date=${the_file:0:10}
echo $date
dir="$(echo $the_file | cut -d'/' -f1)"
echo $dir
echo "##[set-output name=date;]${date}"
echo "##[set-output name=dir;]${dir}"
group=`cat $dir/group.txt`
echo "##[set-output name=group;]${group}"
shell: bash
- name: Setup custom environment variables
run: git config --global push.default simple && git config --global user.email "[email protected]" && git config --global user.name "W3C CCG"
- name: Generate html minutes
id: generate_html_minutes
run: |
cd scribe-tool/
npm install
cd ..
bash ./generate-html.sh
echo "##[set-output name=date;]${DATE}"
echo "##[set-output name=dir;]${DIR}"
echo "##[set-output name=group;]${GROUP}"
env:
CI: true
DATE: ${{ steps.detect_file.outputs.date }}
DIR: ${{ steps.detect_file.outputs.dir }}
GROUP: ${{ steps.detect_file.outputs.group }}
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Add html minutes for telecon [ci skip]
branch: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Send email
uses: dawidd6/action-send-mail@v3
with:
server_address: mail.gandi.net
server_port: 465
username: ${{ secrets.email_username }}
password: ${{ secrets.email_password }}
subject: ${{ format('[MINUTES] W3C CCG {0} Call - {1}', steps.detect_file.outputs.group, steps.detect_file.outputs.date) }}
body: ${{ format('file://{0}/email.log', steps.detect_file.outputs.dir) }}
to: [email protected]
from: CCG Minutes Bot