mirror of
https://github.com/Cockatrice/Magic-Token.git
synced 2026-03-24 02:54:30 -05:00
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7 to 8. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v7...v8) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
67 lines
2.2 KiB
YAML
67 lines
2.2 KiB
YAML
name: Image URLs
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# runs in the middle of each month
|
|
- cron: '0 0 15 * *'
|
|
pull_request:
|
|
branches: [ master ]
|
|
paths:
|
|
- '.github/workflows/update_links.yml'
|
|
- 'scripts/update_image_links.py'
|
|
|
|
jobs:
|
|
update_links:
|
|
# Do not run the scheduled workflow on forks
|
|
if: github.event_name != 'schedule' || github.repository_owner == 'Cockatrice'
|
|
|
|
name: Update links
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Query Scryfall API and update picURLs
|
|
shell: bash
|
|
working-directory: ./scripts
|
|
run: python3 update_image_links.py ../tokens.xml --inplace
|
|
|
|
- name: Create pull request
|
|
if: github.event_name != 'pull_request'
|
|
id: create_pr
|
|
uses: peter-evans/create-pull-request@v8
|
|
with:
|
|
add-paths: |
|
|
tokens.xml
|
|
commit-message: Update image links
|
|
# author is the owner of the commit
|
|
author: github-actions <github-actions@github.com>
|
|
branch: ci-update_image_links
|
|
delete-branch: true
|
|
title: 'Update image links'
|
|
body: |
|
|
Update all picURLs in the `tokens.xml` file via Scryfall API.
|
|
|
|
---
|
|
*This PR is automatically generated and updated by the workflow at `.github/workflows/update_links.yml`. Review [action runs][1].*<br>
|
|
|
|
[1]: https://github.com/Cockatrice/Magic-Token/actions/workflows/update_links.yml?query=branch%3Amaster
|
|
labels: |
|
|
CI
|
|
draft: false
|
|
|
|
- name: PR Status
|
|
if: github.event_name != 'pull_request'
|
|
shell: bash
|
|
env:
|
|
STATUS: ${{ steps.create_pr.outputs.pull-request-operation }}
|
|
run: |
|
|
if [[ "$STATUS" == "none" ]]; then
|
|
echo "PR #${{ steps.create_pr.outputs.pull-request-number }} unchanged!" >> $GITHUB_STEP_SUMMARY
|
|
else
|
|
echo "PR #${{ steps.create_pr.outputs.pull-request-number }} $STATUS!" >> $GITHUB_STEP_SUMMARY
|
|
fi
|
|
echo "URL: ${{ steps.create_pr.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY
|