Compare commits
2 Commits
8c443ba402
...
bd24e833cb
Author | SHA1 | Date | |
---|---|---|---|
bd24e833cb
|
|||
a17d35df03
|
@@ -18,12 +18,21 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
steps:
|
steps:
|
||||||
- name: Extract version
|
- name: Extract version and image name
|
||||||
run: |
|
run: |
|
||||||
|
# remove "releases/"
|
||||||
VERSION="${VERSION#releases/}"
|
VERSION="${VERSION#releases/}"
|
||||||
|
# set image name to lower case
|
||||||
|
IMAGE_NAME="${IMAGE_NAME,,}"
|
||||||
|
|
||||||
echo "Exporting variable VERSION=$VERSION"
|
echo "Exporting variable VERSION=$VERSION"
|
||||||
|
echo "Exporting variable IMAGE_NAME=$IMAGE_NAME"
|
||||||
|
|
||||||
echo "VERSION=$VERSION" >> $GITEA_OUTPUT
|
echo "VERSION=$VERSION" >> $GITEA_OUTPUT
|
||||||
|
echo "IMAGE_NAME=$IMAGE_NAME" >> $GITEA_OUTPUT
|
||||||
|
|
||||||
echo "VERSION=$VERSION" >> $GITEA_ENV
|
echo "VERSION=$VERSION" >> $GITEA_ENV
|
||||||
|
echo "IMAGE_NAME=$IMAGE_NAME" >> $GITEA_ENV
|
||||||
|
|
||||||
- name: Install Buildah
|
- name: Install Buildah
|
||||||
run: |-
|
run: |-
|
||||||
@@ -44,12 +53,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Build and tag
|
- name: Build and tag
|
||||||
run: |-
|
run: |-
|
||||||
echo "Building image $REGISTRY/${IMAGE_NAME,,}:$VERSION / latest"
|
echo "Building image ${REGISTRY}/${IMAGE_NAME}:${VERSION} / latest"
|
||||||
buildah build --isolation=chroot --build-arg VERSION=$VERSION -t katenary -f ./oci/katenary/Containerfile .
|
buildah build --isolation=chroot --build-arg VERSION=${VERSION} -t katenary -f ./oci/katenary/Containerfile .
|
||||||
buildah tag katenary $REGISTRY/${IMAGE_NAME,,}:$VERSION
|
buildah tag katenary ${REGISTRY}/${IMAGE_NAME}:${VERSION}
|
||||||
buildah tag katenary $REGISTRY/${IMAGE_NAME,,}:latest
|
buildah tag katenary ${REGISTRY}/${IMAGE_NAME}:latest
|
||||||
|
|
||||||
- name: Push image
|
- name: Push image
|
||||||
run: |-
|
run: |-
|
||||||
buildah push $REGISTRY/${IMAGE_NAME,,}:$VERSION
|
buildah push ${REGISTRY}/${IMAGE_NAME}:${VERSION}
|
||||||
buildah push $REGISTRY/${IMAGE_NAME,,}:latest
|
buildah push ${REGISTRY}/${IMAGE_NAME}:latest
|
||||||
|
Reference in New Issue
Block a user