From 528c49843aa31059a561ab15c52fc71a7d7cfa9e Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Mon, 27 Nov 2023 18:11:08 +0200 Subject: [PATCH 1/3] Update SBOM workflow --- .github/workflows/sbom.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sbom.yaml b/.github/workflows/sbom.yaml index 01691df..980741d 100644 --- a/.github/workflows/sbom.yaml +++ b/.github/workflows/sbom.yaml @@ -15,18 +15,17 @@ jobs: - name: Install Syft run: | curl -sSfL https://raw.githubusercontent.com/anchore/syft/4fc17edd146af34ab06f5b0443ef8ddac3aaf076/install.sh | sh -s -- -b /usr/local/bin - - name: Set tag + - name: Set version run: | version=$(yq '(.version|split("-"))[0]' rockcraft.yaml) - base=$(yq '(.base|split(":"))[1]' rockcraft.yaml) - echo "tag=${version}-${base}_edge" >> "$GITHUB_ENV" + echo "=${version}" >> "$GITHUB_ENV" - uses: actions/download-artifact@v3 with: name: charmed-mysql-rock - name: Create SBOM - run: syft charmed-mysql_${{env.tag}}_amd64.rock -o spdx-json=charmed-mysql_${{env.tag}}_amd64.rock.spdx.json + run: syft charmed-mysql_${{env.version}}_amd64.rock -o spdx-json=charmed-mysql_${{env.version}}_amd64.rock.spdx.json - name: Upload SBOM uses: actions/upload-artifact@v3 with: - path: "charmed-mysql_${{env.tag}}_amd64.rock.spdx.json" - name: charmed-mysql_${{env.tag}}_amd64.rock.spdx.json + path: "charmed-mysql_${{env.version}}_amd64.rock.spdx.json" + name: charmed-mysql_${{env.version}}_amd64.rock.spdx.json From 30a5ec42edb03dead5acc7e37fb8406a4fb31763 Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Mon, 27 Nov 2023 18:19:50 +0200 Subject: [PATCH 2/3] Change base --- .github/workflows/build.yaml | 8 +------- .github/workflows/check_version.yaml | 2 -- .github/workflows/publish.yaml | 6 +++--- rockcraft.yaml | 2 +- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8865648..4408fba 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -22,13 +22,7 @@ jobs: sudo snap install --classic --channel edge rockcraft - name: Build ROCK id: pack - run: | - app_version=$(yq '.version' rockcraft.yaml) - version=$(yq '(.version|split("-"))[0]' rockcraft.yaml) - base=$(yq '(.base|split(":"))[1]' rockcraft.yaml) - tag=${version}-${base}_edge - sed -i "s/${app_version}/${tag}/g" rockcraft.yaml - rockcraft pack + run: rockcraft pack - name: Upload rockcraft logs if: ${{ failure() && steps.pack.outcome == 'failure' }} uses: actions/upload-artifact@v3 diff --git a/.github/workflows/check_version.yaml b/.github/workflows/check_version.yaml index 9a3a1ee..96fd77d 100644 --- a/.github/workflows/check_version.yaml +++ b/.github/workflows/check_version.yaml @@ -8,8 +8,6 @@ jobs: runs-on: ubuntu-22.04 timeout-minutes: 15 steps: - - name: 'Foresight: Collect workflow telemetry' - uses: runforesight/foresight-workflow-kit-action@v1 - uses: actions/checkout@v3 - name: Install yq run: sudo snap install yq diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index bd62edc..6a2837b 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -33,7 +33,7 @@ jobs: with: name: charmed-mysql-rock - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ secrets.GHCR_USER }} @@ -42,9 +42,9 @@ jobs: run: | app=$(yq .name rockcraft.yaml) version=$(yq '(.version)' rockcraft.yaml) - base=$(yq '(.base|split(":"))[1]' rockcraft.yaml) + base=$(yq '(.base|split("@"))[1]' rockcraft.yaml) tag=${version}-${base}_edge sudo skopeo --insecure-policy copy \ - oci-archive:${app}_${tag}_amd64.rock \ + oci-archive:${app}_${version}_amd64.rock \ docker-daemon:ghcr.io/canonical/${app}:${tag} docker push ghcr.io/canonical/${app}:${tag} diff --git a/rockcraft.yaml b/rockcraft.yaml index 712ff1d..5750eb0 100644 --- a/rockcraft.yaml +++ b/rockcraft.yaml @@ -1,5 +1,5 @@ name: charmed-mysql # the name of your ROCK -base: ubuntu:22.04 # the base environment for this ROCK +base: ubuntu@22.04 # the base environment for this ROCK version: '8.0.34' # just for humans. Semantic versioning is recommended summary: Charmed MySQL ROCK OCI # 79 char long summary description: | From be2794bb1bfd284e2818ade3406a29a755d05753 Mon Sep 17 00:00:00 2001 From: Shayan Patel Date: Wed, 29 Nov 2023 19:47:15 +0000 Subject: [PATCH 3/3] Update rock version to 8.0.35 --- rockcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rockcraft.yaml b/rockcraft.yaml index 712ff1d..260d4e9 100644 --- a/rockcraft.yaml +++ b/rockcraft.yaml @@ -1,6 +1,6 @@ name: charmed-mysql # the name of your ROCK base: ubuntu:22.04 # the base environment for this ROCK -version: '8.0.34' # just for humans. Semantic versioning is recommended +version: '8.0.35' # just for humans. Semantic versioning is recommended summary: Charmed MySQL ROCK OCI # 79 char long summary description: | MySQL built from the official MySQL package