Chore: Fix pylint issues with new version of pylint (#150) #61
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: 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 }} |