Skip to content

Fetch Sponsorship Data #49

Fetch Sponsorship Data

Fetch Sponsorship Data #49

Workflow file for this run

name: Fetch Sponsorship Data
on:
push:
schedule:
- cron: '0 0 * * *' # Midnight UTC
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate set "debug_enabled"'
type: boolean
required: false
default: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPONSORED_ORG_NAME: ${{ github.repository_owner }}
jobs:
update:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Load 1password secret(s)
uses: 1password/load-secrets-action@v2
with:
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: "${{ secrets.TESTS_SERVICE_ACCOUNT_TOKEN }}"
SPONSORSHIPS_READ_TOKEN: "op://test-secrets/DDEV_READ_ORG_SPONSORSHIPS/credential"
- name: Install requirements
run: |
sudo npm install -g strip-json-comments-cli
- name: Setup tmate session
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
- name: Fetch data with script
run: |
bash -c "SPONSORED_ENTITY_NAME=ddev SPONSORED_ENTITY_TYPE=organization scripts/github-sponsorships.sh"
bash -c "SPONSORED_ENTITY_NAME=rfay SPONSORED_ENTITY_TYPE=user scripts/github-sponsorships.sh"
bash scripts/combine-sponsorships.sh
- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add data/
git commit -m "Update sponsorship data [skip ci]" || echo "No changes to commit"
git push