-
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add docker metadata action to other workflows as well.
- Loading branch information
Showing
3 changed files
with
81 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,7 +162,7 @@ jobs: | |
fi | ||
fi | ||
echo "JLEVEL=${JLEVEL}" >> $GITHUB_ENV | ||
echo "build_datetime=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_OUTPUT | ||
echo "build_datetime=$(date -u +'%FT%T.%3NZ')" >> $GITHUB_OUTPUT | ||
echo "build_version=$(grep 'OCCU_VERSION =' buildroot-external/package/occu/occu.mk | cut -d' ' -f3 | cut -d'-' -f1).$(date +%Y%m%d)" >> $GITHUB_OUTPUT | ||
- name: Switch to experimental EULA files | ||
|
@@ -300,6 +300,29 @@ jobs: | |
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.CR_PAT }} | ||
|
||
- name: Extract docker metadata | ||
if: github.event.inputs.skip_build == 'false' | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
labels: | | ||
org.opencontainers.image.description=Alternative OS for your homematicIP CCU | ||
org.opencontainers.image.vendor=RasperryMatic OpenSource Project | ||
org.opencontainers.image.authors=RaspberryMatic OpenSource Team | ||
org.opencontainers.image.version=${{ env.BUILD_VERSION }}-${{ env.GITHUB_SHA7 }} | ||
org.opencontainers.image.url=https://raspberrymatic.de | ||
org.opencontainers.image.created=${{ env.BUILD_DATETIME }} | ||
annotations: | | ||
org.opencontainers.image.description=Alternative OS for your homematicIP CCU | ||
org.opencontainers.image.vendor=RasperryMatic OpenSource Project | ||
org.opencontainers.image.authors=RaspberryMatic OpenSource Team | ||
org.opencontainers.image.version=${{ env.BUILD_VERSION }}-${{ env.GITHUB_SHA7 }} | ||
org.opencontainers.image.url=https://raspberrymatic.de | ||
org.opencontainers.image.created=${{ env.BUILD_DATETIME }} | ||
env: | ||
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index | ||
|
||
- name: Build and push container image | ||
if: github.event.inputs.skip_build == 'false' | ||
uses: docker/[email protected] | ||
|
@@ -311,12 +334,11 @@ jobs: | |
# load not supported -> https://github.com/docker/buildx/issues/290 | ||
# load: true #load in docker - needed for testing later on | ||
push: ${{ env.SECRETS_ARE_AVAILABLE }} | ||
|
||
build-args: | | ||
tar_prefix=RaspberryMatic-${{ env.BUILD_VERSION }}-oci_ | ||
labels: | | ||
org.opencontainers.image.title=RaspberryMatic | ||
org.opencontainers.image.description=Alternative OS for your HomeMatic CCU | ||
org.opencontainers.image.description=Alternative OS for your homematicIP CCU | ||
org.opencontainers.image.vendor=RasperryMatic OpenSource Project | ||
org.opencontainers.image.authors=RaspberryMatic OpenSource Team | ||
org.opencontainers.image.licenses=Apache-2.0 | ||
|
@@ -335,6 +357,8 @@ jobs: | |
io.hass.arch=armv7|aarch64|amd64 | ||
tags: | | ||
${{ env.CCU_OCI_REPO }}:${{ env.CCU_OCI_TAG }} | ||
annotations: | | ||
${{ steps.meta.outputs.annotations }} | ||
- name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} | ||
|
@@ -349,7 +373,6 @@ jobs: | |
platforms: linux/amd64 # load does not support muti-arch https://github.com/docker/buildx/issues/290 | ||
load: true # load in docker - needed for testing later on | ||
push: false | ||
|
||
build-args: | | ||
tar_prefix=RaspberryMatic-${{ env.BUILD_VERSION }}-oci_ | ||
labels: | | ||
|
@@ -373,6 +396,8 @@ jobs: | |
io.hass.arch=armv7|aarch64|amd64 | ||
tags: | | ||
${{ env.CCU_OCI_REPO }}:${{ env.CCU_OCI_TAG }} | ||
annotations: | | ||
${{ steps.meta.outputs.annotations }} | ||
- name: Enable experimental features for the Docker daemon and CLI | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ jobs: | |
- name: Setup Environment | ||
run: | | ||
echo "GIT_REF=$(git symbolic-ref -q --short HEAD || git describe --tags --exact-match)" >> $GITHUB_ENV | ||
echo "BUILD_DATETIME=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV | ||
echo "BUILD_DATETIME=$(date -u +'%FT%T.%3NZ')" >> $GITHUB_ENV | ||
# download OCI platform release assets | ||
- uses: robinraju/[email protected] | ||
|
@@ -84,6 +84,28 @@ jobs: | |
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.CR_PAT }} | ||
|
||
- name: Extract docker metadata | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
labels: | | ||
org.opencontainers.image.description=Alternative OS for your homematicIP CCU | ||
org.opencontainers.image.vendor=RasperryMatic OpenSource Project | ||
org.opencontainers.image.authors=RaspberryMatic OpenSource Team | ||
org.opencontainers.image.version=${{ env.BUILD_VERSION }}-${{ env.GITHUB_SHA7 }} | ||
org.opencontainers.image.url=https://raspberrymatic.de | ||
org.opencontainers.image.created=${{ env.BUILD_DATETIME }} | ||
annotations: | | ||
org.opencontainers.image.description=Alternative OS for your homematicIP CCU | ||
org.opencontainers.image.vendor=RasperryMatic OpenSource Project | ||
org.opencontainers.image.authors=RaspberryMatic OpenSource Team | ||
org.opencontainers.image.version=${{ env.BUILD_VERSION }}-${{ env.GITHUB_SHA7 }} | ||
org.opencontainers.image.url=https://raspberrymatic.de | ||
org.opencontainers.image.created=${{ env.BUILD_DATETIME }} | ||
env: | ||
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index | ||
|
||
- name: Build and push container image | ||
uses: docker/[email protected] | ||
id: docker_build | ||
|
@@ -96,7 +118,7 @@ jobs: | |
tar_prefix=RaspberryMatic-${{ github.event.inputs.release_tag }}-oci_ | ||
labels: | | ||
org.opencontainers.image.title=RaspberryMatic | ||
org.opencontainers.image.description=Alternative OS for your HomeMatic CCU | ||
org.opencontainers.image.description=Alternative OS for your homematicIP CCU | ||
org.opencontainers.image.vendor=RasperryMatic OpenSource Project | ||
org.opencontainers.image.authors=RaspberryMatic OpenSource Team | ||
org.opencontainers.image.licenses=Apache-2.0 | ||
|
@@ -116,6 +138,8 @@ jobs: | |
tags: | | ||
${{ steps.extract_branch.outputs.unique_tag }} | ||
${{ steps.extract_branch.outputs.branch_tag }} | ||
annotations: | | ||
${{ steps.meta.outputs.annotations }} | ||
- name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,7 +152,7 @@ jobs: | |
fi | ||
echo "JLEVEL=${JLEVEL}" >> $GITHUB_ENV | ||
echo "FAKE_BUILD=${{ github.event.inputs.skip_build }}" >> $GITHUB_ENV | ||
echo "build_datetime=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_OUTPUT | ||
echo "build_datetime=$(date -u +'%FT%T.%3NZ')" >> $GITHUB_OUTPUT | ||
# - name: remote debug tmate session | ||
# uses: mxschmitt/action-tmate@v1 | ||
|
@@ -416,6 +416,28 @@ jobs: | |
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.CR_PAT }} | ||
|
||
- name: Extract docker metadata | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
labels: | | ||
org.opencontainers.image.description=Alternative OS for your homematicIP CCU | ||
org.opencontainers.image.vendor=RasperryMatic OpenSource Project | ||
org.opencontainers.image.authors=RaspberryMatic OpenSource Team | ||
org.opencontainers.image.version=${{ needs.release_draft.outputs.version }} | ||
org.opencontainers.image.url=https://raspberrymatic.de | ||
org.opencontainers.image.created=${{ needs.build.outputs.build_datetime }} | ||
annotations: | | ||
org.opencontainers.image.description=Alternative OS for your homematicIP CCU | ||
org.opencontainers.image.vendor=RasperryMatic OpenSource Project | ||
org.opencontainers.image.authors=RaspberryMatic OpenSource Team | ||
org.opencontainers.image.version=${{ needs.release_draft.outputs.version }} | ||
org.opencontainers.image.url=https://raspberrymatic.de | ||
org.opencontainers.image.created=${{ needs.build.outputs.build_datetime }} | ||
env: | ||
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index | ||
|
||
- name: Build and push container image | ||
if: github.event.inputs.skip_build == 'false' | ||
uses: docker/[email protected] | ||
|
@@ -429,7 +451,7 @@ jobs: | |
tar_prefix=RaspberryMatic-${{ needs.release_draft.outputs.version }}-oci_ | ||
labels: | | ||
org.opencontainers.image.title=RaspberryMatic | ||
org.opencontainers.image.description=Alternative OS for your HomeMatic CCU | ||
org.opencontainers.image.description=Alternative OS for your homematicIP CCU | ||
org.opencontainers.image.vendor=RasperryMatic OpenSource Project | ||
org.opencontainers.image.authors=RaspberryMatic OpenSource Team | ||
org.opencontainers.image.licenses=Apache-2.0 | ||
|
@@ -449,6 +471,8 @@ jobs: | |
tags: | | ||
${{ steps.extract_branch.outputs.unique_tag }} | ||
${{ steps.extract_branch.outputs.branch_tag }} | ||
annotations: | | ||
${{ steps.meta.outputs.annotations }} | ||
- name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} | ||
|