feat: MAAS Site Manager enrol (#296) #55
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |