-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added dependabot config * Update actions, move shell-lint to separate workflow * Add workflow to delete PR cache
- Loading branch information
Dmytro Bondar
authored
Jan 13, 2024
1 parent
ba3c23d
commit 3e28c6e
Showing
5 changed files
with
85 additions
and
41 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
|
||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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 |
---|---|---|
|
@@ -2,8 +2,7 @@ | |
name: CI | ||
|
||
env: | ||
VERSION_GO: '1.20.12' | ||
VERSION_HELM: 'v3.13.3' | ||
VERSION_HELM: 'v3.11.3' | ||
|
||
on: | ||
pull_request: | ||
|
@@ -17,17 +16,10 @@ jobs: | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.VERSION_GO }} | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
go-version-file: 'go.mod' | ||
|
||
- name: Install dependencies | ||
run: make bootstrap | ||
|
@@ -73,20 +65,20 @@ jobs: | |
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Helm | ||
uses: azure/setup-helm@v1.1 | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: ${{ env.VERSION_HELM }} | ||
|
||
- name: Setup WSL | ||
if: "contains(matrix.shell, 'wsl')" | ||
uses: Vampire/setup-wsl@v1 | ||
uses: Vampire/setup-wsl@v2 | ||
|
||
- name: Setup Cygwin | ||
if: "contains(matrix.shell, 'cygwin')" | ||
uses: egor-tensin/setup-cygwin@v3 | ||
uses: egor-tensin/setup-cygwin@v4 | ||
with: | ||
platform: x64 | ||
|
||
|
@@ -103,10 +95,10 @@ jobs: | |
with: | ||
version: "v0.11.1" | ||
|
||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Helm | ||
uses: azure/setup-helm@v1.1 | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: ${{ env.VERSION_HELM }} | ||
|
||
|
@@ -124,15 +116,3 @@ jobs: | |
|
||
- name: helm diff upgrade -C 3 --set replicaCount=2 --install helm-diff ./helm-diff | ||
run: helm diff upgrade -C 3 --set replicaCount=2 --install helm-diff ./helm-diff | ||
|
||
shell-lint: | ||
name: Lint install-binary.sh | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: luizm/[email protected] | ||
with: | ||
sh_checker_exclude: "scripts" | ||
sh_checker_checkbashisms_enable: true |
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,33 @@ | ||
--- | ||
name: Cleanup | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
cleanup-cache: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Cleanup PR cache' | ||
run: | | ||
gh extension install actions/gh-actions-cache | ||
REPO="${{ github.repository }}" | ||
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge" | ||
echo "Fetching list of cache key" | ||
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 ) | ||
## Setting this to not fail the workflow while deleting cache keys. | ||
set +e | ||
echo "Deleting caches..." | ||
for cacheKey in $cacheKeysForPR | ||
do | ||
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm | ||
done | ||
echo "Done" | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
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,22 @@ | ||
name: Lint sh | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
paths: ['install-binary.sh'] | ||
pull_request: | ||
branches: [master] | ||
paths: ['install-binary.sh'] | ||
|
||
jobs: | ||
lint-sh: | ||
name: Lint install-binary.sh | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: luizm/[email protected] | ||
with: | ||
sh_checker_exclude: 'scripts' | ||
sh_checker_checkbashisms_enable: true |
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