Skip to content

Add Monthly Meet

Add Monthly Meet #17

# GitHub Actions Virtual Environments
# https://github.com/actions/virtual-environments/
name: Add Monthly Meet
on:
workflow_dispatch:
inputs:
year:
description: 'Year (YYYY)'
type: string
required: true
default: '2026'
month:
description: 'Month (MM)'
type: string
required: true
day:
description: 'Day (DD)'
type: string
required: true
location:
description: 'Location'
type: string
required: true
default: 'Denver, CO'
event_type:
description: 'Event Type'
required: true
default: monthly_meet
type: choice
options:
- monthly_meet
- hook_pull
jobs:
main:
name: Update Events
runs-on: ubuntu-latest
steps:
- name: ruby versions
run: |
ruby --version
gem --version
- name: git checkout
uses: actions/checkout@v6
# https://github.com/ruby/setup-ruby
- name: ruby setup
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: verify inputs
run: |
echo "Date: ${{ inputs.year }}-${{ inputs.month }}-${{ inputs.day }}"
echo "Location: ${{ inputs.location }}"
echo "Event Type: ${{ inputs.event_type }}"
- name: edit events.yml
run: make monthly-meet \
date="${{ inputs.year }}-${{ inputs.month }}-${{ inputs.day }}" \
loc="${{ inputs.location }}" \
type="${{ inputs.event_type }}"
# https://github.com/peter-evans/create-pull-request
- name: create pull request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.PAT_HAL_CODEBOT }}
commit-message: "[automated] Add event ${{ inputs.year }}-${{ inputs.month }}-${{ inputs.day }}"
title: "[automated] Add event ${{ inputs.year }}-${{ inputs.month }}-${{ inputs.day }}"
body: "Added: ${{ inputs.event_type }} **${{ inputs.year }}-${{ inputs.month }}-${{ inputs.day }}** in _${{ inputs.location }}_"
branch: automated/update-events
delete-branch: true
reviewers: jessesquires, aebelenkiy
- name: enable automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
run: gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}"
env:
GH_TOKEN: ${{ secrets.PAT_HAL_CODEBOT }}