Migrating to GitHub Actions
Uninstall the GitHub App #
- Navigate to Settings > Applications > Installed GitHub Apps (for a user) or Settings > GitHub Apps > Installed GitHub Apps (for an organization)
- Click Configure on the
Restyled.io
App - Click Uninstall
For more details, see here .
Add a Restyled Workflow #
Commit the following file in your repositories:
# .github/workflows/restyled.yml
name: Restyled
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
restyled:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: restyled-io/actions/setup@v4
- id: restyler
uses: restyled-io/actions/run@v4
with:
fail-on-differences: true
- if: |
!cancelled() &&
steps.restyler.outputs.success == 'true' &&
github.event.pull_request.head.repo.full_name == github.repository
uses: peter-evans/create-pull-request@v6
with:
base: ${{ steps.restyler.outputs.restyled-base }}
branch: ${{ steps.restyler.outputs.restyled-head }}
title: ${{ steps.restyler.outputs.restyled-title }}
body: ${{ steps.restyler.outputs.restyled-body }}
labels: "restyled"
reviewers: ${{ github.event.pull_request.user.login }}
delete-branch: true
For more details, see here .
Differences #
Assuming you use the example workflow above, in an attempt to keep behavior as close to the original Restyled jobs as possible, you will find the following differences:
Status #
Users used to see a restyled
PR status, with our avatar. The details link
would go to the Restyled Pull Request (or the Job if there is none):
Now, the status will be the same as any other Workflow, with the details link taking you to that workflow.
Author #
Restyled PRs used to be opened by the restyled-io
app user:
They’re now opened by the github-actions
bot:
GITHUB_TOKEN
in the
create-pull-request
step.
Patch Command #
Users used to see a curl <url> | git am
command in the Job log, and they could
follow that URL to see the full patch as its own web page:
Now, they will see a base64 | git am << <heredoc>
command and can optionally
expand the full patch directly in logs: