-
Notifications
You must be signed in to change notification settings - Fork 21
86 lines (73 loc) · 2.18 KB
/
30-update-ssh-keywords.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#
# ssh-config-mode-el/.github/workflows/30-update-ssh-keywords.yml ---
#
name: 30-update-ssh-keywords
on:
# once a month.
schedule:
# mm hh dom mon dow (no H, like jenkins)
- cron: '0 0 1 * *'
#
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
update-ssh-keywords:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
# The cache unpacking runs as the user, allow us to write.
- name: Chmod /var/cache/apt/archives
run: |
sudo chmod a+w /var/cache/apt/archives/.
- name: Cache apt pkgs
id: cache-apt-pkgs
uses: actions/cache@v2
with:
key: cache-apt-pkgs
# -${{ github.sha }}
restore-keys: |
cache-apt-pkgs
path: |
/var/cache/apt/archives/*.deb
- name: apt-get install
run: |
sudo apt-get update
sudo apt-get install -y \
ca-certificates \
git \
make
- name: Cache openssh-portable
id: cache-openssh-portable
uses: actions/cache@v2
with:
key: cache-openssh-portable
restore-keys: |
cache-openssh-portable
path: |
${{github.workspace}}/get-keywords/openssh-portable
- name: Checkout openssh
id: openssh
run: |
cd ${GITHUB_WORKSPACE}/get-keywords
make _update_openssh
cd ${GITHUB_WORKSPACE}/get-keywords/openssh-portable
echo "::set-output name=tag::$(git describe --tags)"
- name: Update keywords
run: |
cd ${GITHUB_WORKSPACE}/get-keywords
make _update_keywords
- name: Create PR
uses: peter-evans/create-pull-request@v3
with:
commit-message: Update ssh keywords to ${{steps.openssh.outputs.tag}}
committer: 30-update-ssh-keywords <noreply@noreply>
author: ${{github.actor}} <${{github.actor}}@noreply>
branch: 30-update-ssh-keywords
delete-branch: true
body: |
Update ssh keywords to ${{steps.openssh.outputs.tag}}
assignees: jhgorrell
reviewers: jhgorrell