forked from canonical/self-signed-certificates-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.36 KB
/
publish-charm.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
name: Publish charm
on:
workflow_call:
secrets:
CHARMCRAFT_AUTH:
required: true
jobs:
publish-charm:
strategy:
matrix:
arch:
- arch: amd64
runner: ubuntu-22.04
runs-on: ${{ matrix.arch.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install charmcraft
run: sudo snap install charmcraft --classic
- name: Fetch Tested Charm
uses: actions/download-artifact@v4
with:
name: built-charm-${{ matrix.arch.arch }}
- name: Get Charm Under Test Path
id: charm-path
run: echo "charm_path=$(find . -name '*.charm' -type f -print)" >> $GITHUB_OUTPUT
- name: Select Charmhub channel
uses: canonical/charming-actions/[email protected]
id: channel
- name: Upload charm to Charmhub
uses: canonical/charming-actions/[email protected]
with:
built-charm-path: ${{ steps.charm-path.outputs.charm_path }}
credentials: "${{ secrets.CHARMCRAFT_AUTH }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
channel: "${{ steps.channel.outputs.name }}"
- name: Archive charmcraft logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: charmcraft-logs
path: /home/runner/.local/state/charmcraft/log/*.log