Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ paths:
# knows v3's inputs and the lint passes without them.
- 'missing input "app-id" which is required by action "actions/create-github-app-token@v3"'
- 'input "client-id" is not defined in action "actions/create-github-app-token@v3"'
.github/workflows/sync-upstream.yml:
ignore:
# Same false positive as release-please.yml above: actionlint's bundled metadata predates
# actions/create-github-app-token v3's `client-id` input. Added 2026-11-02 with the Refresh Bot
# token for the sync PR. Delete both entries when an actionlint release knows v3's inputs.
- 'missing input "app-id" which is required by action "actions/create-github-app-token@v3"'
- 'input "client-id" is not defined in action "actions/create-github-app-token@v3"'
21 changes: 18 additions & 3 deletions .github/workflows/sync-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
# release. Packagist reads the tag and lists the new version.
#
# Required:
# GITHUB_TOKEN (automatic) for PR creation.
# Refresh Bot (REFRESH_APP_CLIENT_ID / REFRESH_APP_PRIVATE_KEY, org level; a
# private repo needs repository copies) for the push and the PR. The
# organisation does not let GITHUB_TOKEN create pull requests, so a sync PR
# opened with it fails with "GitHub Actions is not permitted to create or
# approve pull requests".

name: Sync upstream

Expand Down Expand Up @@ -64,10 +68,21 @@ jobs:
git config user.name "ichava-sync-bot"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

# A per-run Refresh Bot token, so the PR can be opened at all (GITHUB_TOKEN
# may not create pull requests here) and its checks start like any other.
- name: Mint the Refresh Bot token
id: app
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.REFRESH_APP_CLIENT_ID }}
private-key: ${{ secrets.REFRESH_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write

- name: Authenticate gh for PR creation
run: gh auth setup-git
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.app.outputs.token }}

# Build from the toolkit checkout instead of pulling ghcr.io — the
# GHCR package is private and other repos' GITHUB_TOKENs cannot pull
Expand All @@ -77,7 +92,7 @@ jobs:

- name: Run icon-sets-sync via Docker
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.app.outputs.token }}
PACK_SLUG: ${{ github.event.repository.name }}
run: |
# An array, not a string: $FLAGS unquoted relies on word-splitting to
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to `ichava/icon-sets-flag` follow [Keep a Changelog](https:/

## [Unreleased]

### Fixed

- The weekly upstream sync opens its pull request with a Refresh Bot token. GitHub Actions' own
token is not allowed to create pull requests in this organisation, so the sync failed at its last
step after refreshing the assets.

## [0.1.0] - TBD

First release of `ichava/icon-sets-flag`. The repository is published as a single commit; the 0.1.x tags cut between 2026-10-23 and 2026-10-26 (v0.1.0 to v0.1.1) are folded into this release, and their notes are kept below under *Archived history*.
Expand Down
Loading