From 2d13dbe9b9e956b8d1a19fda1c1efedc7ccd471f Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 7 Mar 2022 14:57:12 +0100 Subject: [PATCH] Add codenotary support (#45) --- .github/workflows/test.yaml | 10 ++++++++++ README.md | 34 ++++++++++++++++++---------------- action.yaml | 16 ++++++++++++++++ test/build.json | 4 ++++ 4 files changed, 48 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 829e5c7..2a8cb15 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -49,6 +49,16 @@ jobs: exit 1; fi + if [[ "${{ steps.information.outputs.codenotary_base_image }}" != "base_image@example.com" ]]; then + echo "::error ::'codenotary_base_image' does not have the expected value" + exit 1; + fi + + if [[ "${{ steps.information.outputs.codenotary_signer }}" != "signer@example.com" ]]; then + echo "::error ::'codenotary_signer' does not have the expected value" + exit 1; + fi + if [[ "${{ steps.information.outputs.config }}" != "test/config.yaml" ]]; then echo "::error ::'config' does not have the expected value" exit 1; diff --git a/README.md b/README.md index 8b44250..5d7c006 100644 --- a/README.md +++ b/README.md @@ -62,22 +62,24 @@ you'd like to get information from. The Action provides the following information as output: -| Output | Description | -| :-------------: | :-------------------------------------------------------: | -| `aarch64` | Boolean if the add-on support the `aarch64` architecture. | -| `amd64` | Boolean if the add-on support the `amd64` architecture. | -| `architectures` | List of supported architectures by this add-on. | -| `armhf` | Boolean if the add-on support the `armhf` architecture. | -| `build` | File location of the build.json configuration file. | -| `config` | File location of the add-on config.json configuration. | -| `description` | Description of the add-on. | -| `i386` | Boolean if the add-on support the `i386` architecture. | -| `name` | The name of the add-on. | -| `slug` | The configured add-on slug. | -| `target` | The add-on target folder. | -| `image` | The Image-template of the add-on. | -| `version` | The version of the add-on. | -| `armv7` | Boolean if the add-on support the `armv7` architecture. | +| Output | Description | +| :---------------------: | :-------------------------------------------------------: | +| `aarch64` | Boolean if the add-on support the `aarch64` architecture. | +| `amd64` | Boolean if the add-on support the `amd64` architecture. | +| `architectures` | List of supported architectures by this add-on. | +| `armhf` | Boolean if the add-on support the `armhf` architecture. | +| `build` | File location of the build.json configuration file. | +| `codenotary_base_image` | Verify the base container image. | +| `codenotary_signer` | Owner signer E-Mail address for this image. | +| `config` | File location of the add-on config.json configuration. | +| `description` | Description of the add-on. | +| `i386` | Boolean if the add-on support the `i386` architecture. | +| `name` | The name of the add-on. | +| `slug` | The configured add-on slug. | +| `target` | The add-on target folder. | +| `image` | The Image-template of the add-on. | +| `version` | The version of the add-on. | +| `armv7` | Boolean if the add-on support the `armv7` architecture. | ## Changelog & Releases diff --git a/action.yaml b/action.yaml index d9897b9..2ff6c0d 100644 --- a/action.yaml +++ b/action.yaml @@ -28,6 +28,12 @@ outputs: build: description: File location of the build.json configuration file value: ${{ steps.find.outputs.build }} + codenotary_base_image: + description: Verify the base container image + value: ${{ steps.basic.outputs.codenotary_base_image }} + codenotary_signer: + description: Owner signer E-Mail address for this image + value: ${{ steps.basic.outputs.codenotary_signer }} config: description: File location of the add-on config.json configuration value: ${{ steps.find.outputs.config }} @@ -129,6 +135,16 @@ runs: version=$(yq --no-colors eval '.version' "${{ steps.find.outputs.config }}") echo "::set-output name=version::${version}" + codenotary_signer=$( + yq --no-colors eval '.codenotary.signer' "${{ steps.find.outputs.build }}" + ) + echo "::set-output name=codenotary_signer::${codenotary_signer}" + + codenotary_base_image=$( + yq --no-colors eval '.codenotary.base_image' "${{ steps.find.outputs.build }}" + ) + echo "::set-output name=codenotary_base_image::${codenotary_base_image}" + - name: ℹ️ Extract add-on architecture information shell: bash id: architectures diff --git a/test/build.json b/test/build.json index ae10efb..0c0ba3d 100644 --- a/test/build.json +++ b/test/build.json @@ -5,5 +5,9 @@ "armhf": "fake/base:1.0.0", "armv7": "fake/base:1.0.0", "i386": "fake/base:1.0.0" + }, + "codenotary": { + "signer": "signer@example.com", + "base_image": "base_image@example.com" } }