Skip to content

Commit

Permalink
Fix published artifact filename
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-ratushnyy committed Dec 5, 2023
1 parent 50f90ed commit ffaa853
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)
file_name=$(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_${file_name}_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)
file_name=$(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_${file_name}_amd64.rock \
docker-daemon:ghcr.io/canonical/charmed-mongodb:${tag}
docker push ghcr.io/canonical/charmed-mongodb:${tag}

0 comments on commit ffaa853

Please sign in to comment.