Skip to content

Commit

Permalink
Add codenotary support (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Mar 7, 2022
1 parent 5cdcfeb commit 2d13dbe
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 16 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ jobs:
exit 1;
fi
if [[ "${{ steps.information.outputs.codenotary_base_image }}" != "[email protected]" ]]; then
echo "::error ::'codenotary_base_image' does not have the expected value"
exit 1;
fi
if [[ "${{ steps.information.outputs.codenotary_signer }}" != "[email protected]" ]]; 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;
Expand Down
34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 16 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions test/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
"armhf": "fake/base:1.0.0",
"armv7": "fake/base:1.0.0",
"i386": "fake/base:1.0.0"
},
"codenotary": {
"signer": "[email protected]",
"base_image": "[email protected]"
}
}

0 comments on commit 2d13dbe

Please sign in to comment.