-
Notifications
You must be signed in to change notification settings - Fork 82
52 lines (43 loc) · 1.5 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
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: refs/heads/${{ inputs.pr_branch }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 # v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2
- name: Run Cargo Install
id: generated-fixtures
run: cargo install --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