Skip to content

Commit

Permalink
Fix published file name (#31)
Browse files Browse the repository at this point in the history
* Fix published artifact filename

* Use a better variable name
  • Loading branch information
dmitry-ratushnyy authored Dec 5, 2023
1 parent 50f90ed commit 75f92a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ jobs:
password: ${{ secrets.GHCR_TOKEN }}
- name: Import and push to GHCR
run: |
version=$(yq '(.version)' rockcraft.yaml)
version=$(yq '(.version|split("-"))[0]' rockcraft.yaml)
rock_image_version=$(yq '(.version)' rockcraft.yaml)
base=$(yq '(.base|split("@"))[1]' rockcraft.yaml)
tag=${version}-${base}_edge
sudo skopeo --insecure-policy copy \
oci-archive:charmed-mongodb_${version}_amd64.rock \
oci-archive:charmed-mongodb_${rock_image_version}_amd64.rock \
docker-daemon:ghcr.io/canonical/charmed-mongodb:${tag}
docker push ghcr.io/canonical/charmed-mongodb:${tag}
5 changes: 3 additions & 2 deletions .github/workflows/publish_beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ jobs:
password: ${{ secrets.GHCR_TOKEN }}
- name: Import and push to GHCR
run: |
version=$(yq '(.version)' rockcraft.yaml)
version=$(yq '(.version|split("-"))[0]' rockcraft.yaml)
rock_image_version=$(yq '(.version)' rockcraft.yaml)
base=$(yq '(.base|split("@"))[1]' rockcraft.yaml)
tag=${version}-${base}_beta
sudo skopeo --insecure-policy copy \
oci-archive:charmed-mongodb_${version}_amd64.rock \
oci-archive:charmed-mongodb_${rock_image_version}_amd64.rock \
docker-daemon:ghcr.io/canonical/charmed-mongodb:${tag}
docker push ghcr.io/canonical/charmed-mongodb:${tag}

0 comments on commit 75f92a3

Please sign in to comment.