chore(ci): improve CI performance (#9257)
**Description** The CI was using an old devcontainer for things where this wasn't technically 100% needed. By removing it we can cut it down by another 50-70% for single-chart runs, such as container updates. **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [x] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] 🔃 Refactor of current code **🧪 How Has This Been Tested?** <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> **📃 Notes:** <!-- Please enter any other relevant information here --> **✔️ Checklist:** - [x] ⚖️ My code follows the style guidelines of this project - [x] 👀 I have performed a self-review of my own code - [x] #️⃣ I have commented my code, particularly in hard-to-understand areas - [x] 📄 I have made corresponding changes to the documentation - [x] ⚠️ My changes generate no new warnings - [x] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [x] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
This commit is contained in:
parent
e6495729f3
commit
f9b44d282b
|
@ -26,19 +26,13 @@ jobs:
|
|||
- name: Setting repo parent dir as safe safe.directory
|
||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
|
||||
with:
|
||||
repository: truecharts/catalog
|
||||
path: catalog
|
||||
## TODO: Only run on the existing catalog when CI or template changes are actually detected
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
|
||||
# with:
|
||||
# repository: truecharts/catalog
|
||||
# path: catalog
|
||||
|
||||
- name: build-and-run
|
||||
run: |
|
||||
tools/build-release.sh
|
||||
|
||||
- uses: vishnudxb/cancel-workflow@c3c77eb4383ba7d023e6614a07d94fe990501ac6 # tag=v1.2
|
||||
if: failure()
|
||||
with:
|
||||
repo: truecharts/charts
|
||||
workflow_id: ${{ github.run_id }}
|
||||
access_token: ${{ github.token }}
|
||||
|
|
|
@ -20,8 +20,6 @@ jobs:
|
|||
lint-and-verify:
|
||||
name: Lint Charts and Verify Dependencies
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: tccr.io/truecharts/devcontainer:v3.1.38@sha256:2fd9355bc6791461430db87a04f5fe7b49c46bc5957bc348f1efbff4c6c7913d
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
|
||||
|
@ -37,6 +35,17 @@ jobs:
|
|||
|
||||
- name: Setting repo parent dir as safe safe.directory
|
||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
- name: Install go-yq
|
||||
run: |
|
||||
mkdir -p $HOME/.local/bin
|
||||
wget https://github.com/mikefarah/yq/releases/download/v4.26.1/yq_linux_amd64 -O $HOME/.local/bin/go-yq && \
|
||||
chmod +x $HOME/.local/bin/go-yq
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Install pre-commit, yamale and yamllint
|
||||
run: |
|
||||
pip3 install --no-cache-dir pre-commit yamale yamllint
|
||||
|
||||
- name: Prep Helm
|
||||
run: |
|
||||
|
@ -62,16 +71,15 @@ jobs:
|
|||
if [[ $(echo ${OUTPUT_JSON} | jq --compact-output '. | length') -gt 0 ]]; then
|
||||
echo "detected=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
|
||||
- name: Test and Fix Pre-Commit Issues
|
||||
shell: bash
|
||||
if: inputs.chartChangesDetected == 'true'
|
||||
run: |
|
||||
echo "Running pre-commit test-and-cleanup..."
|
||||
pre-commit run --all ||:
|
||||
# Fix sh files to always be executable
|
||||
find . -name '*.sh' | xargs chmod +x
|
||||
pre-commit run --all
|
||||
pre-commit run --all || pre-commit run --all
|
||||
|
||||
- name: Fetch and Verify dependencies
|
||||
shell: bash
|
||||
|
|
|
@ -18,8 +18,6 @@ jobs:
|
|||
generate-install-matrix:
|
||||
name: Generate matrix for install
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: tccr.io/truecharts/devcontainer:v3.1.38@sha256:2fd9355bc6791461430db87a04f5fe7b49c46bc5957bc348f1efbff4c6c7913d
|
||||
outputs:
|
||||
matrix1: |
|
||||
{
|
||||
|
@ -57,6 +55,13 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 1
|
||||
ref: ${{ inputs.checkoutCommit }}
|
||||
|
||||
- name: Install go-yq
|
||||
run: |
|
||||
mkdir -p $HOME/.local/bin
|
||||
wget https://github.com/mikefarah/yq/releases/download/v4.26.1/yq_linux_amd64 -O $HOME/.local/bin/go-yq && \
|
||||
chmod +x $HOME/.local/bin/go-yq
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Run chart-testing (list-changed)
|
||||
id: list-changed
|
||||
|
|
|
@ -22,7 +22,7 @@ sources:
|
|||
- https://github.com/truecharts/charts/tree/master/charts/stable/jackett
|
||||
- https://github.com/Jackett/Jackett
|
||||
type: application
|
||||
version: 14.0.27
|
||||
version: 14.0.28
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- media
|
||||
|
|
|
@ -22,7 +22,7 @@ sources:
|
|||
- https://github.com/truecharts/charts/tree/master/charts/stable/sonarr
|
||||
- https://github.com/Sonarr/Sonarr
|
||||
type: application
|
||||
version: 15.0.20
|
||||
version: 15.0.21
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- media
|
||||
|
|
Loading…
Reference in New Issue