-
Notifications
You must be signed in to change notification settings - Fork 653
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Using CAS for content-trust * v2 * Fix linting errors * Adjust field checked for status in CAS response * CI workflow needs CAS not VCN now * Use cwd in test as code won't be in /usr/src * Pre-cache CAS pub key for supervisor * Cas doesn't actually need key file executable Co-authored-by: Mike Degatano <[email protected]>
- Loading branch information
Showing
13 changed files
with
103 additions
and
70 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 |
---|---|---|
|
@@ -33,6 +33,7 @@ on: | |
- setup.py | ||
|
||
env: | ||
DEFAULT_PYTHON: 3.9 | ||
BUILD_NAME: supervisor | ||
BUILD_TYPE: supervisor | ||
WHEELS_TAG: 3.9-alpine3.14 | ||
|
@@ -138,7 +139,7 @@ jobs: | |
CAS_API_KEY: ${{ secrets.CAS_TOKEN }} | ||
|
||
codenotary: | ||
name: CodeNotary signature | ||
name: CAS signature | ||
needs: init | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -148,6 +149,20 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | ||
if: needs.init.outputs.publish == 'true' | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
|
||
- name: Install dirhash and calc hash | ||
if: needs.init.outputs.publish == 'true' | ||
id: dirhash | ||
run: | | ||
pip3 install dirhash | ||
dir_hash="$(dirhash "${{ github.workspace }}" -a sha256 --match "*.py")" | ||
echo "::set-output name=dirhash::${dir_hash}" | ||
- name: Set version | ||
if: needs.init.outputs.publish == 'true' | ||
uses: home-assistant/actions/helpers/version@master | ||
|
@@ -158,10 +173,8 @@ jobs: | |
if: needs.init.outputs.publish == 'true' | ||
uses: home-assistant/actions/helpers/codenotary@master | ||
with: | ||
source: dir://${{ github.workspace }} | ||
user: ${{ secrets.VCN_USER }} | ||
password: ${{ secrets.VCN_PASSWORD }} | ||
organisation: ${{ secrets.VCN_ORG }} | ||
source: hash://${{ steps.dirhash.outputs.dirhash }} | ||
token: ${{ secrets.CAS_TOKEN }} | ||
|
||
version: | ||
name: Update version | ||
|
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ on: | |
env: | ||
DEFAULT_PYTHON: 3.9 | ||
PRE_COMMIT_HOME: ~/.cache/pre-commit | ||
DEFAULT_VCN: v0.9.8 | ||
DEFAULT_CAS: v1.0.1 | ||
|
||
jobs: | ||
# Separate job to pre-populate the base dependency cache | ||
|
@@ -351,10 +351,10 @@ jobs: | |
id: python | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install VCN tools | ||
uses: home-assistant/actions/helpers/vcn@master | ||
- name: Install CAS tools | ||
uses: home-assistant/actions/helpers/cas@master | ||
with: | ||
vcn_version: ${{ env.DEFAULT_VCN }} | ||
version: ${{ env.DEFAULT_CAS }} | ||
- name: Restore Python virtual environment | ||
id: cache-venv | ||
uses: actions/[email protected] | ||
|
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
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 |
---|---|---|
|
@@ -9,6 +9,8 @@ build_from: | |
codenotary: | ||
signer: [email protected] | ||
base_image: [email protected] | ||
args: | ||
CAS_VERSION: 1.0.1 | ||
labels: | ||
io.hass.type: supervisor | ||
org.opencontainers.image.title: Home Assistant Supervisor | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-----BEGIN PUBLIC KEY----- | ||
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE03LvYuz79GTJx4uKp3w6NrSe5JZI | ||
iBtgzzYi0YQYtZO/r+xFpgDJEa0gLHkXtl94fpqrFiN89In83lzaszbZtA== | ||
-----END PUBLIC KEY----- |
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
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
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
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
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
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
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