Skip to content

Commit

Permalink
[MISC] Fix build workflow (#16)
Browse files Browse the repository at this point in the history
* Fix build workflow

* Update base field

* Split base on at

* Remove autoupdate of rockcraft.yaml version
  • Loading branch information
dragomirp authored Nov 27, 2023
1 parent e35bdf8 commit b10a658
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@ jobs:
sudo snap install yq
sudo snap install rockcraft --classic --edge
- name: Build ROCK
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 locally built ROCK artifact
uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Import and push to GHCR
run: |
version=$(yq '(.version|split("-"))[0]' 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:charmed-postgresql_${tag}_amd64.rock \
Expand Down
2 changes: 1 addition & 1 deletion rockcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: charmed-postgresql # 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: '14.9' # just for humans. Semantic versioning is recommended
summary: PostgreSQL in a ROCK. # 79 char long summary
description: |
Expand Down

0 comments on commit b10a658

Please sign in to comment.