canonical / canonical/operator-workflows

Fixed commits fail to publish charms

Open
#683 3 comments 0 reactions 1 assignee Claimed by @weiiwang01 View on GitHub
Dominant language
Python
Stars
12
Forks
27
Avg merge
2d 23h
Merged PRs (30d)
12

Description

Notice how our release-branch CI needs to point to a fixed commit of the operator-workflows
Here:
https://github.com/canonical/k8s-operator/blob/release-1.32/.github/workflows/publish-charms.yaml#L44
```yaml
publish-to-edge:
needs: [configure-channel, charmcraft-channel]
uses: canonical/operator-workflows/.github/workflows/publish_charm.yaml@e848763f1e14d3169781fe95b4b896399a1a8a92
strategy:
matrix:
charm:
- { path: ./charms/worker/k8s/, tagPrefix: k8s }
- { path: ./charms/worker/, tagPrefix: k8s-worker }
arch:
- amd64
- arm64
```

the publish_charm at that commit
https://github.com/canonical/operator-workflows/blob/e848763f1e14d3169781fe95b4b896399a1a8a92/.github/workflows/publish_charm.yaml#L77

references `@main`
```yaml
publish-charm:
name: Publish charm to ${{ inputs.channel || needs.select-channel.outputs.destination-channel }}
runs-on: ubuntu-latest
needs: [select-channel]
outputs:
charm-directory: ${{ steps.publish.outputs.charm-directory }}
steps:
- uses: actions/checkout@v4.2.2
- run: sudo snap install charmcraft --channel ${{ inputs.charmcraft-channel }} --classic
# required to use skopeo embedded within rockcraft - otherwise a docker error
# "io: read/write on closed pipe" will happen
- run: sudo snap install rockcraft --classic
- uses: canonical/operator-workflows/internal/publish@main
```

rather than
```yaml
- uses: canonical/operator-workflows/internal/publish@e848763f1e14d3169781fe95b4b896399a1a8a92
```

This basically means you cannot use PINNED versions of the `operator-workflow` b/c its internally referencing workflows that are unpinned from a commit.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.