Skip to content

Commit

Permalink
Merge pull request #20 from kruserr/2024-02-23
Browse files Browse the repository at this point in the history
2024 02 23
  • Loading branch information
kruserr authored Feb 23, 2024
2 parents 8c42af6 + 5643b8d commit a4d4712
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 11 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

env:
IMAGE_NAME: rapiddb
IMAGE_LATEST: docker.pkg.github.com/kruserr/rapiddb/rapiddb:latest
IMAGE_CACHE: docker.pkg.github.com/kruserr/rapiddb/rapiddb:cache

jobs:
rustfmt:
Expand Down Expand Up @@ -98,7 +98,8 @@ jobs:
- name: Build image
run: |
docker build \
--cache-from $IMAGE_LATEST \
-f tooling/Dockerfile
--cache-from $IMAGE_CACHE \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--tag $IMAGE_NAME .
- name: Login to GitHub Packages
Expand Down Expand Up @@ -130,6 +131,9 @@ jobs:
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION_MAJOR
docker push $IMAGE_ID:$VERSION_MAJOR
docker tag $IMAGE_NAME $IMAGE_ID:latest
docker push $IMAGE_ID:latest
- name: Login to Docker Hub
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login docker.io -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Push image to Docker Hub
Expand Down Expand Up @@ -159,3 +163,6 @@ jobs:
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION_MAJOR
docker push $IMAGE_ID:$VERSION_MAJOR
docker tag $IMAGE_NAME $IMAGE_ID:latest
docker push $IMAGE_ID:latest
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

env:
IMAGE_NAME: rapiddb
IMAGE_LATEST: docker.pkg.github.com/kruserr/rapiddb/rapiddb:latest
IMAGE_CACHE: docker.pkg.github.com/kruserr/rapiddb/rapiddb:cache

jobs:
rustfmt:
Expand Down Expand Up @@ -57,7 +57,8 @@ jobs:
- name: Build image
run: |
docker build \
--cache-from $IMAGE_LATEST \
-f tooling/Dockerfile
--cache-from $IMAGE_CACHE \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--tag $IMAGE_NAME .
- name: Login to GitHub Packages
Expand All @@ -69,8 +70,7 @@ jobs:
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Use Docker `latest` tag convention
VERSION=latest
VERSION=cache
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
Expand All @@ -83,8 +83,7 @@ jobs:
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Use Docker `latest` tag convention
VERSION=latest
VERSION=cache
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions prepare_release.sh → tooling/prepare_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ prepare_tag () {
- {% if commit.breaking %}(breaking) {% endif %}{{ commit.message | upper_first }} ({{ commit.id | truncate(length=7, end=\"\") }})\
{% endfor %}
{% endfor %}"
changelog=$(git-cliff --config git-cliff-detailed.toml --unreleased --strip all)
changelog=$(git-cliff --config tooling/git-cliff-detailed.toml --unreleased --strip all)

git add -A && git commit -m "chore(release): prepare for $1"

Expand All @@ -49,7 +49,7 @@ if [ -n $1 ]; then

bump_version $2

git-cliff --tag "$2" > CHANGELOG.md
git-cliff --config tooling/cliff.toml --tag "$2" > CHANGELOG.md

prepare_tag $2
else
Expand All @@ -60,7 +60,7 @@ if [ -n $1 ]; then

bump_version $1

git-cliff --unreleased --tag "$1" --prepend CHANGELOG.md
git-cliff --config tooling/cliff.toml --unreleased --tag "$1" --prepend CHANGELOG.md

prepare_tag $1
fi
Expand Down
File renamed without changes.

0 comments on commit a4d4712

Please sign in to comment.