Skip to content

chore(deps): update dependency pydantic to v1.10.17 (#130) #55

chore(deps): update dependency pydantic to v1.10.17 (#130)

chore(deps): update dependency pydantic to v1.10.17 (#130) #55

name: Publish Charms to 1.xx/edge
on:
workflow_dispatch:
push:
branches:
- main
- release-*
jobs:
configure-channel:
runs-on: ubuntu-latest
outputs:
track: ${{ steps.channel.outputs.track }}
risk: ${{ steps.channel.outputs.risk }}
steps:
- name: Determine Channel
id: channel
env:
BRANCH: ${{ github.base_ref || github.ref }}
run: |
BRANCH=${BRANCH#refs/heads/} # strip off refs/heads/ if it exists
if [[ "${BRANCH}" == "main" ]]; then
echo "track=latest" >> "$GITHUB_OUTPUT"
echo "risk=edge" >> "$GITHUB_OUTPUT"
elif [[ "${BRANCH}" =~ ^release-[0-9]+\.[0-9]+$ ]]; then
echo "track=${BRANCH:8}" >> "$GITHUB_OUTPUT"
echo "risk=beta" >> "$GITHUB_OUTPUT"
else
echo "::error Failed to determine track/risk from branch ${BRANCH}"
exit 1
fi
charmcraft-channel:
runs-on: ubuntu-latest
outputs:
channel: ${{ steps.charmcraft.outputs.channel }}
steps:
- uses: actions/checkout@v4
- name: Read charmcraft version file
id: charmcraft
run: echo "channel=$(cat .charmcraft-channel)" >> $GITHUB_OUTPUT
publish-to-edge:
needs: [configure-channel, charmcraft-channel]
uses: canonical/operator-workflows/.github/workflows/publish_charm.yaml@08c5a65a0bc4696164b4f85a29a9ccbd830d10d8
strategy:
matrix:
charm: [
{path: "./charms/worker/", tagPrefix: "k8s-worker"},
{path: "./charms/worker/k8s/", tagPrefix: "k8s"}
]
secrets: inherit
with:
channel: ${{needs.configure-channel.outputs.track}}/${{needs.configure-channel.outputs.risk}}
working-directory: ${{ matrix.charm.path }}
charmcraft-channel: ${{ needs.charmcraft-channel.outputs.channel }}
tag-prefix: ${{ matrix.charm.tagPrefix }}