-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (62 loc) · 2.84 KB
/
rust-update-dependencies.yml
File metadata and controls
63 lines (62 loc) · 2.84 KB
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
56
57
58
59
60
61
62
63
on:
workflow_call:
inputs:
working-directory:
type: string
default: "."
description: Working directory to find the rust crate
branch:
type: string
default: "main"
description: Branch where to look for the dep
dry_run:
type: string
default: "false"
description: "Should the update be done or just a dry run"
jobs:
test:
name: Check for Rust Auto-Discovery
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout github wide resources
uses: actions/checkout@v3
with:
ref: "v1"
repository: ForesightMiningSoftwareCorporation/github
path: ".github_wide_resources"
- name: Install Updatecli in the runner
uses: updatecli/updatecli-action@v2
with:
version: "v0.44.0"
- uses: tibdex/github-app-token@v1.8
id: generate_token
if: github.ref == 'refs/heads/main'
with:
app_id: ${{ secrets.UPDATECLIBOT_APP_ID }}
private_key: ${{ secrets.UPDATECLIBOT_APP_PRIVKEY }}
- uses: ForesightMiningSoftwareCorporation/github/.github/actions/login-private-registry@v3.2.0
if: steps.check_exists.outputs.exists != 'true'
with:
private_key: ${{ secrets.CARGO_PRIVATE_REGISTRY_SSH_PRIVATE_KEY }}
host: ${{ secrets.CARGO_PRIVATE_REGISTRY_HOST }}
name: ${{ secrets.CARGO_PRIVATE_REGISTRY_NAME }}
token: ${{ secrets.CARGO_PRIVATE_REGISTRY_TOKEN }}
cos_username: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_USERNAME }}
cos_password: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_PASSWORD }}
cos_tenant: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_TENANT }}
cos_subscription: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_SUBSCRIPTION }}
- name: Run UpdateCli Autodiscovery
shell: bash
run: |
updatecli ${{ inputs.dry_run == 'true' && 'diff' || 'apply' }} --experimental --config $GITHUB_WORKSPACE/.github_wide_resources/updatecli/updatecli.d/rust/autodiscovery.yml --values $GITHUB_WORKSPACE/.github_wide_resources/updatecli/values.github-action.yaml
env:
UPDATECLI_GITHUB_ACTOR: ${{ vars.UPDATECLI_BOT_GITHUB_ACTOR }}
UPDATECLI_GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
UPDATECLI_BRANCH: ${{ inputs.branch }}
UPDATECLI_REPO: ${{ github.event.repository.name }}
UPDATECLI_ROOTDIR: ${{ inputs.working-directory }}
UPDATECLI_CARGO_PRIVATE_REGISTRY_GIT_HTTP_URL: ${{ secrets.CARGO_PRIVATE_REGISTRY_GIT_HTTP_URL }}
UPDATECLI_CARGO_PRIVATE_REGISTRY_GIT_HTTP_USERNAME: ${{ secrets.CARGO_PRIVATE_REGISTRY_GIT_HTTP_USERNAME }}
UPDATECLI_CARGO_PRIVATE_REGISTRY_GIT_HTTP_PASSWORD: ${{ secrets.CARGO_PRIVATE_REGISTRY_GIT_HTTP_PASSWORD }}