-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore(ci): cleanup GitHub Actions * Update .github/workflows/format.yml
- Loading branch information
1 parent
56d04e4
commit 8642912
Showing
4 changed files
with
17 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: "Format Code" | ||
name: Format | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -7,33 +7,9 @@ on: | |
- main | ||
|
||
jobs: | ||
format: | ||
prettier: | ||
if: github.repository_owner == 'withastro' | ||
runs-on: ubuntu-latest | ||
env: | ||
NODE_OPTIONS: "--max_old_space_size=4096" | ||
steps: | ||
- name: Check out code using Git | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
# Needs access to push to main | ||
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }} | ||
- name: Setup PNPM | ||
uses: pnpm/action-setup@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: "pnpm" | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Format code | ||
run: pnpm run format:ci | ||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "[ci] format" | ||
branch: ${{ github.head_ref }} | ||
commit_user_name: fredkbot | ||
commit_user_email: [email protected] | ||
uses: withastro/automation/.github/workflows/format.yml@main | ||
with: | ||
command: "format:ci" | ||
secrets: inherit |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,21 +18,14 @@ jobs: | |
congrats: | ||
name: congratsbot | ||
if: ${{ github.repository_owner == 'withastro' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: setup | ||
env: | ||
MESSAGE: ${{ github.event.commits[0].message }} | ||
run: | | ||
TRIMMED=$(echo "$MESSAGE" | sed '1!d;q') | ||
echo "::set-output name=COMMIT_MSG::${TRIMMED}" | ||
- name: Send a Discord notification when a PR is merged | ||
env: | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_CONGRATS }} | ||
# DISCORD_AVATAR: ${{ github.event.pull_request.user.avatar_url }} | ||
uses: Ilshidur/[email protected] | ||
with: | ||
args: "**Merged!** ${{ github.event.commits[0].author.name }}: [`${{ steps.setup.outputs.COMMIT_MSG }}`](<https://github.com/withastro/astro/commit/${{ github.event.commits[0].id }}>)" | ||
uses: withastro/automation/.github/workflows/congratsbot.yml@main | ||
with: | ||
GITHUB_REPO: ${{ github.repository }} | ||
COMMIT_AUTHOR: ${{ github.event.commits[0].author.name }} | ||
COMMIT_MESSAGE: ${{ github.event.commits[0].message }} | ||
COMMIT_ID: ${{ github.event.commits[0].id }} | ||
secrets: | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_CONGRATS }} | ||
|
||
check_for_update: | ||
name: Check for Updates | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters