-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: updated ci pipelines for security and best practices (#2535)
* Updated to use self-hosted runners Signed-off-by: Roger Barker <[email protected]> * Updated workflows for various pinned actions Signed-off-by: Roger Barker <[email protected]> * Updated workflows to pin commits to actions Signed-off-by: Roger Barker <[email protected]> * Added hardened runner step Signed-off-by: Roger Barker <[email protected]> * Update DAPP to make `make` available Signed-off-by: Roger Barker <[email protected]> * Updated workflows to get python back in Signed-off-by: Roger Barker <[email protected]> * Added setup helm to charts.yml Signed-off-by: Roger Barker <[email protected]> * Forgot to add setup-helm action to install in charts Signed-off-by: Roger Barker <[email protected]> * Updated workflows to correct failures in runners Signed-off-by: Roger Barker <[email protected]> * Updated download-artifact version Signed-off-by: Roger Barker <[email protected]> * Updated timeout on acceptance-workflow:run-acceptance-tests step to 30 minutes Signed-off-by: Roger Barker <[email protected]> --------- Signed-off-by: Roger Barker <[email protected]>
- Loading branch information
Showing
18 changed files
with
248 additions
and
91 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,26 +13,55 @@ concurrency: | |
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
runs-on: [self-hosted, Linux, medium, ephemeral] | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Setup Helm | ||
uses: Azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 | ||
|
||
- name: Install ct | ||
uses: helm/[email protected] | ||
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1 | ||
|
||
- name: Run lint | ||
run: ct lint --config .github/ct.yaml --all | ||
|
||
install: | ||
runs-on: ubuntu-latest | ||
runs-on: [self-hosted, Linux, medium, ephemeral] | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
with: | ||
fetch-depth: 0 | ||
submodules: 'false' | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Setup Helm | ||
uses: Azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 | ||
|
||
- name: Setup kubectl | ||
uses: Azure/setup-kubectl@3e0aec4d80787158d308d7b364cb1b702e7feb7f # v4.0.0 | ||
|
||
- name: Install k3d | ||
run: curl --retry 3 -fsL https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash | ||
|
||
|
@@ -41,15 +70,15 @@ jobs: | |
timeout-minutes: 3 | ||
|
||
- name: Set up Docker Qemu | ||
uses: docker/setup-qemu-action@v2 | ||
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 | ||
with: | ||
driver-opts: network=host | ||
|
||
- name: Build and push images | ||
uses: docker/build-push-action@v4 | ||
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 | ||
with: | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
@@ -59,7 +88,7 @@ jobs: | |
tags: localhost:5001/${{ github.repository }}:test | ||
|
||
- name: Install ct | ||
uses: helm/[email protected] | ||
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1 | ||
|
||
- name: Install chart | ||
run: ct install --helm-extra-args="--timeout 10m" --all |
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
Oops, something went wrong.