-
Notifications
You must be signed in to change notification settings - Fork 6
78 lines (73 loc) · 2.44 KB
/
release.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Release Charms to Edge and Publish Libraries
on:
push:
branches:
- main
- track/*
jobs:
detect-region-changes:
name: Detect changes to maas-region charm
runs-on: ubuntu-latest
outputs:
any_changed: ${{ steps.echo-changes.outputs.any_changed }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Determine changed files in the commit
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
maas-region/**
- name: Echo changed files
id: echo-changes
run: |
echo "Changes made: ${{ steps.changed-files.outputs.any_changed }}"
echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}"
echo "any_changed=${{ steps.changed-files.outputs.any_changed }}" >> $GITHUB_OUTPUT
release-region:
name: Release MAAS Region charm to edge
needs: detect-region-changes
if: needs.detect-region-changes.outputs.any_changed == 'true'
uses: canonical/observability/.github/workflows/charm-release.yaml@main
secrets: inherit
with:
charm-path: maas-region
release-tag-prefix: maas-region
provider: lxd
detect-agent-changes:
name: Detect changes to maas-agent charm
needs: release-region
if: always() && !failure() && !cancelled()
runs-on: ubuntu-latest
outputs:
any_changed: ${{ steps.echo-changes.outputs.any_changed }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Determine changed files in the commit
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
maas-agent/**
- name: Echo changed files
id: echo-changes
run: |
echo "Changes made: ${{ steps.changed-files.outputs.any_changed }}"
echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}"
echo "any_changed=${{ steps.changed-files.outputs.any_changed }}" >> $GITHUB_OUTPUT
release-agent:
name: Release MAAS Agent charm to edge
needs: detect-agent-changes
if: needs.detect-agent-changes.outputs.any_changed == 'true'
uses: canonical/observability/.github/workflows/charm-release.yaml@main
secrets: inherit
with:
charm-path: maas-agent
release-tag-prefix: maas-agent
provider: lxd