Skip to content

Commit

Permalink
add CHARM_NAME var
Browse files Browse the repository at this point in the history
- remove extraneous upload step in integration test
  • Loading branch information
barrettj12 committed Oct 18, 2023
1 parent 7100598 commit 0d98965
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
push:
pull_request:
workflow_dispatch:
env:
CHARM_NAME: ${{ vars.CHARM_NAME }}

jobs:

Expand Down Expand Up @@ -82,6 +84,7 @@ jobs:
run: |
sudo snap install charmcraft --classic
charmcraft upload ${{ steps.download.outputs.download-path }}/*.charm \
--name $CHARM_NAME \
--release ${{ needs.channel.outputs.test }}
Expand All @@ -108,17 +111,6 @@ jobs:
mv ${{ steps.download.outputs.download-path }}/*.charm \
$LOCAL_CHARM_PATH
# Currently the only way to get charms on k8s is via Charmhub.
- name: Upload charm to Charmhub
id: charmcraft
if: matrix.cloud == 'microk8s'
env:
CHARMCRAFT_AUTH: ${{ secrets.CHARMCRAFT_AUTH }}
run: |
sudo snap install charmcraft --classic
charmcraft upload $LOCAL_CHARM_PATH \
--name $CHARMHUB_NAME --release $CHARMHUB_CHANNEL
- name: Save charmcraft logs as artifact
if: always() && steps.charmcraft.outcome != 'skipped'
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -182,12 +174,12 @@ jobs:
- name: Get uploaded revision
id: revision
run: |
charmcraft status juju-controller --format json |
charmcraft status $CHARM_NAME --format json |
jq ${{ needs.channel.outputs.release }} ...
- name: Release to edge
if: github.event_name == 'push'
run: |
charmcraft release juju-controller \
charmcraft release $CHARM_NAME \
--revision=${{ steps.revision.outputs.revision }}
--channel=${{ needs.channel.outputs.release }}

0 comments on commit 0d98965

Please sign in to comment.