Skip to content

IAM-224-Oauth interface implementation #4

IAM-224-Oauth interface implementation

IAM-224-Oauth interface implementation #4

Workflow file for this run

name: Release Charm
on:
workflow_call:
inputs:
charm-path:
description: "Path to the charm we want to publish. Defaults to the current working directory."
default: '.'
required: false
type: string
artifact:
description: "Name of artifact to download before building. Must contain the file artifact.tar.gz."
default: ''
required: false
type: string
provider:
description: "The provider to choose for either machine or k8s tests ('lxd' or 'microk8s')"
default: 'microk8s'
required: false
type: string
ip-range:
type: string
description: |
The IP range in the address pool for the load balancer to use.
It can be either a subnet(IP/mask) or a range (<IP1>-<IP2>)
required: false
default: ""
secrets:
CHARMHUB_TOKEN:
required: true
OBSERVABILITY_NOCTUA_TOKEN:
required: true
concurrency:
group: release
cancel-in-progress: true
jobs:
quality-checks:
name: Quality Checks
uses: ./.github/workflows/_charm-quality-checks.yaml@main

Check failure on line 41 in .github/workflows/charm-release.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/charm-release.yaml

Invalid workflow file

invalid value workflow reference: cannot specify version when calling local workflows
secrets: inherit
with:
charm-path: "${{ inputs.charm-path }}"
provider: "${{ inputs.provider }}"
ip-range: "${{ inputs.ip-range }}"
release-charm:
name: Release Charm and Libraries
needs:
- quality-checks
uses: ./.github/workflows/_charm-release.yaml@main
secrets: inherit
with:
artifact: "${{ inputs.artifact }}"
charm-path: "${{ inputs.charm-path }}"
release-libs:
name: Release any bumped charm library
needs:
- quality-checks
runs-on: ubuntu-latest
steps:
- name: Checkout the source
uses: actions/checkout@v3
with:
fetch-depth: 1
path: charm
- name: Release libraries
run: |
# Install Charmcraft
sudo snap install charmcraft --classic --channel latest/stable
cd $GITHUB_WORKSPACE/charm/${{ inputs.charm-path }}
# Get the libs folder name
libraries_folder=$(yq .name metadata.yaml | tr - _)
# For each library belonging to the charm, publish it
for lib in $(find lib/charms/$libraries_folder -type f | sed 's|lib/||' | sed 's/.py//' | sed 's|/|.|g'); do
charmcraft publish-lib $lib
done
env:
CHARMCRAFT_AUTH: "${{ secrets.CHARMHUB_TOKEN }}"