Skip to content

Commit

Permalink
added cmd-fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Bullrich committed Jun 5, 2024
1 parent a09ec64 commit 4ea27e6
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/command-fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Command-FMT

on:
workflow_dispatch:
inputs:
pr:
description: Number of the Pull Request
required: true


jobs:
cmd-fmt:
runs-on: ubuntu-latest
container:
image: paritytech/ci-unified:bullseye-1.75.0-2024-01-22-v20240109
ports:
- 80
volumes:
- my_docker_volume:/volume_mount
steps:
- name: Download repo
uses: actions/checkout@v4
- run: gh pr checkout ${{ inputs.pr }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Export branch name
run: echo "branch=$(git rev-parse --abbrev-ref HEAD)" >> "$GITHUB_OUTPUT"
id: branch
- name: Run FMT
run: |
# format toml.
# since paritytech/ci-unified:bullseye-1.73.0-2023-11-01-v20231204 includes taplo-cli
taplo format --config .config/taplo.toml
- name: Report failure
if: ${{ failure() }}
run: gh pr comment ${{ inputs.pr }} --body "Run for <code>fmt</code> failed. See logs <a href=\"$RUN\">here</a>."
env:
RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
GH_TOKEN: ${{ github.token }}
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: cmd-action - changes
branch: ${{ steps.branch.outputs.branch }}

0 comments on commit 4ea27e6

Please sign in to comment.