-
Notifications
You must be signed in to change notification settings - Fork 83
55 lines (46 loc) · 1.59 KB
/
update-completions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Update Completions fixtures
permissions:
id-token: write # Enable OIDC
pull-requests: write
contents: write
on:
workflow_dispatch:
inputs:
pr_branch:
description: PR branch to push to
required: true
type: string
jobs:
update-fixtures:
name: Update Completions fixtures
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: refs/heads/${{ inputs.pr_branch }}
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1
id: generated-fixtures
with:
command: install
args: --path .
- name: Generate completions
shell: bash
run: |
rustic completions bash > tests/completions-fixtures/bash.txt
rustic completions fish > tests/completions-fixtures/fish.txt
rustic completions zsh > tests/completions-fixtures/zsh.txt
rustic completions powershell > tests/completions-fixtures/powershell.txt
- name: Push fixtures to branch
run: |
git config user.name github-actions
git config user.email [email protected]
git add tests/completions-fixtures/*
git commit -m "Generated: Updated Completions fixtures"
git pull --rebase
git push