Skip to content

Update data and open pull request #58

Update data and open pull request

Update data and open pull request #58

Workflow file for this run

name: Update data and open pull request
on:
schedule:
- cron: '0 18 * * 2'
workflow_dispatch:
jobs:
generate:
runs-on: ubuntu-latest
steps:
- id: is-first-week
env:
EVENT_NAME: ${{ github.event_name }}
run: |
declare result
declare -i dom
dom="$(date +%d | sed 's/^0//')"
if ((dom <= 7)) || [[ "${EVENT_NAME}" == workflow_dispatch ]]; then
result=yes
fi
echo "ok=${result}" >>"$GITHUB_OUTPUT"
- uses: actions/checkout@v4
if: steps.is-first-week.outputs.ok
- uses: ruby/setup-ruby@v1
if: steps.is-first-week.outputs.ok
with:
ruby-version: '3.2'
rubygems: 'latest'
bundler: 2
bundler-cache: true
- run: bundle exec rake release:gha
if: steps.is-first-week.outputs.ok
- uses: peter-evans/[email protected]
if: steps.is-first-week.outputs.ok
with:
commit-message: |
${{ env.UPDATE_TITLE }}
${{ env.UPDATE_BODY }}
branch: update-mime-types-data/${{ env.UPDATE_VERSION }}
title: ${{ env.UPDATE_TITLE }}
body: ${{ env.UPDATE_BODY }}
labels: |
automated
data-update
assignees: |
halostatue
reviewers: |
halostatue