-
Notifications
You must be signed in to change notification settings - Fork 9
56 lines (48 loc) · 1.73 KB
/
update-manifest.yaml
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
name: Update Manifest
on:
push:
branches:
- main
jobs:
update-manifest:
runs-on: ubuntu-latest
steps:
- name: echo actor
run: echo "actor is ${{ github.actor }}"
- uses: actions/checkout@v4
with:
path: ./
ssh-key: ${{ secrets.GH_SSH_KEY}}
persist-credentials: true
- name: update current plugin list
run: |
plugins=$(ls pkg/plugins | tr -s ' ' | sort)
echo "got plugins: $plugins"
echo '
# this manifest contains the name of every currently implemented plugin. it can be pulled via https:/opencost/opencost-plugins/raw/main/manifest to get an up to date list of current plugins.
' > manifest
echo "$plugins" >> manifest
echo "manifest updated"
echo "manifest contents:"
cat manifest
# - uses: EndBug/add-and-commit@v9
# name: commit updated manifest file
# with:
# add: 'manifest'
# commit: --signoff
# message: 'update manifest'
# author_name: 'cliffcolvin'
# github_token:
- name: Commit changes
run: |
git config --local user.email "github-actions[bot]@noreply.example.com"
git config --local user.name "github-actions[bot]"
git add manifest
git commit -m "update manifest"
- name: Push chart to repo
uses: ad-m/github-push-action@master
with:
ssh: true
directory: .
repository: opencost/opencost-plugins
branch: main