Skip to content

Update data and open pull request #86

Update data and open pull request

Update data and open pull request #86

Workflow file for this run

name: Update data and open pull request
on:
schedule:
- cron: '0 18 * * 2'
workflow_dispatch:
jobs:
update-definitions:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- id: is-scheduled
env:
EVENT_NAME: ${{ github.event_name }}
run: |
declare result
declare -i dom
dom="$(date +%d | sed 's/^0//')"
[[ "${EVENT_NAME}" == workflow_dispatch ]] && result=yes
((dom <= 7)) && result=yes
((dom >= 14 && dom <= 21)) && result=yes
echo "ok=${result}" >>"$GITHUB_OUTPUT"
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
persist-credentials: true
if: steps.is-scheduled.outputs.ok
- uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 #v1.207.0
if: steps.is-scheduled.outputs.ok
with:
ruby-version: '3.2'
rubygems: 'latest'
bundler: 2
bundler-cache: true
- run: bundle exec rake release:gha
if: steps.is-scheduled.outputs.ok
- uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f #v7.0.6
if: steps.is-scheduled.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