Skip to content

Commit

Permalink
added commandupdate ui
Browse files Browse the repository at this point in the history
  • Loading branch information
Bullrich committed Jun 6, 2024
1 parent e1296cd commit a5ffe7f
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/command-update-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Command Update UI

on:
workflow_dispatch:
inputs:
pr:
description: Number of the Pull Request
required: true
rust-version:
description: Version of rust. Example 1.70
required: false

jobs:
set-image:
runs-on: ubuntu-latest
outputs:
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
steps:
- name: Checkout
uses: actions/checkout@v4
- id: set_image
run: cat .github/env >> $GITHUB_OUTPUT
cmd-fmt:
needs: [set-image]
runs-on: ubuntu-latest
container:
image: ${{ needs.set-image.outputs.IMAGE }}
steps:
- name: Install gh cli
run: |
(type -p wget >/dev/null || (apt update && apt-get install wget -y)) \
&& mkdir -p -m 755 /etc/apt/keyrings \
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt update \
&& apt install gh -y
git config --global --add safe.directory '*'
- 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: |
"./scripts/update-ui-tests.sh" "${{ inputs.rust-version }}"
- 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 a5ffe7f

Please sign in to comment.