summaryrefslogtreecommitdiffstats
path: root/.github/workflows/update-tedge-ref-docs.yml
blob: a7d747aa16c9e7db587f0c7e38d9d0f126e0ca16 (plain)
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
name: update-tedge-reference-documents

on:
  # trigger manually
  workflow_dispatch:
  # runs automatically on 00:00 UTC on 1st of every month
  schedule:
  - cron: "0 0 1 * *"

jobs:
    build-tedge-create-ref-docs:
      runs-on: Ubuntu-20.04

      steps:
        - name: Checkout
          uses: actions/checkout@v3
        - run: |
           git config --global user.email "info@thin-edge.io"
           git config --global user.name "Versioneer"

        - name: enable toolchain via github action
          # https://github.com/actions-rs/toolchain
          uses: actions-rs/toolchain@v1
          with:
            toolchain: 1.63.0
            override: true

        - name: Enable cache
          # https://github.com/marketplace/actions/rust-cache
          uses: Swatinem/rust-cache@v2

        - name: Build tedge
          uses: actions-rs/cargo@v1
          # https://github.com/marketplace/actions/rust-cargo
          with:
            command: build
            args: -p tedge

        - name: run the update script
          run: ./docs/gen-ref-docs.sh
        - name: Create Pull Request
          uses: peter-evans/create-pull-request@v4
          with:
            commit-message: Create tedge cli reference docs
            delete-branch: true
            title: Create tedge reference docs
            body: Create tedge reference docs
            reviewers: rina23q
            branch: create-pull-request/update-tedge-ref-doc