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
16 changes: 13 additions & 3 deletions .github/workflows/update-t3code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
workflow_dispatch:

permissions:
contents: write
pull-requests: write
contents: read
pull-requests: read

concurrency:
group: update-t3code
Expand Down Expand Up @@ -42,17 +42,27 @@ jobs:
echo "open=true" >> "$GITHUB_OUTPUT"
fi

- name: Create bot token
if: steps.existing.outputs.open != 'true'
id: bot
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.BOT_CLIENT_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}

# The bot opens the PR so validation starts on its own.
- name: Open update pull request
if: steps.existing.outputs.open != 'true'
uses: peter-evans/create-pull-request@v8
with:
token: ${{ steps.bot.outputs.token }}
add-paths: |
flatpak/modules/t3code.yml
flatpak/com.t3tools.t3code.metainfo.xml
branch: automation/update-t3code-${{ steps.release.outputs.result }}
delete-branch: true
draft: true
# Bot-created PRs don't notify anyone unless a person is requested.
# Notifies me of each update, since the PR needs its patches refreshed by hand.
reviewers: TB516
commit-message: "chore(flatpak): update T3 Code to ${{ steps.release.outputs.result }}"
title: "chore(flatpak): update T3 Code to ${{ steps.release.outputs.result }}"
Expand Down
6 changes: 4 additions & 2 deletions docs/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ message, so PR titles use the `type(scope): description` format, such as
`chore(flatpak): update T3 Code to v0.1.7`.

**Validate Flatpak update** runs when packaging PRs are opened, updated, or
reopened. It can also be started from the Actions tab. GitHub requires approval
for runs triggered by the updater's `GITHUB_TOKEN`; approve them in the PR.
reopened. It can also be started from the Actions tab. The updater opens PRs
as the `tbot516` GitHub App, so validation starts on its own. Install the app
on this repository and store its client ID as the Actions variable
`BOT_CLIENT_ID` and its private key as the Actions secret `BOT_PRIVATE_KEY`.
New commits cancel older validation runs for the same PR. Website-only changes
skip package validation and do not change the build cache key.
The workflow applies the patches, builds the Flatpak, runs desktop tests and
Expand Down