Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MISC] Don't update rockcraft version #36

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/check_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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}
11 changes: 5 additions & 6 deletions .github/workflows/sbom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion rockcraft.yaml
Original file line number Diff line number Diff line change
@@ -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: |
Expand Down
Loading