From 25349c81629b7f8d45ae7f1d9920fe78eabf6581 Mon Sep 17 00:00:00 2001 From: Dmitry Ratushnyy Date: Tue, 5 Dec 2023 17:56:23 +0000 Subject: [PATCH] Use a better variable name --- .github/workflows/publish.yaml | 4 ++-- .github/workflows/publish_beta.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 6167abd..b2bec9a 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -40,10 +40,10 @@ jobs: - name: Import and push to GHCR run: | version=$(yq '(.version|split("-"))[0]' rockcraft.yaml) - file_name=$(yq '(.version)' 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_${file_name}_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} diff --git a/.github/workflows/publish_beta.yaml b/.github/workflows/publish_beta.yaml index 6c7d175..272daed 100644 --- a/.github/workflows/publish_beta.yaml +++ b/.github/workflows/publish_beta.yaml @@ -37,10 +37,10 @@ jobs: - name: Import and push to GHCR run: | version=$(yq '(.version|split("-"))[0]' rockcraft.yaml) - file_name=$(yq '(.version)' 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_${file_name}_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}