From a8a2f8de3f9ac1c21435f793e328aa509e0eaac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20B=C3=A4hler?= Date: Thu, 19 Oct 2023 14:28:02 +0200 Subject: [PATCH] chore(ci): release security and workflow updates --- .github/PULL_REQUEST_TEMPLATE.md | 2 -- .github/actions/exists/action.yaml | 21 +++++++++++++++++++++ .github/actions/setup-caches/action.yaml | 20 ++++++++++++++++++++ .github/configs/ct.yaml | 2 +- .github/dependabot.yml | 16 ++++++++++++++++ 5 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 .github/actions/exists/action.yaml create mode 100644 .github/actions/setup-caches/action.yaml create mode 100644 .github/dependabot.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 5821b06c..8bb50c70 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -15,6 +15,4 @@ following ourselves these points: - explain what and why in the body, if more than a trivial change, wrapping at 72 characters -If you have any issue or question, reach out us! -https://clastix.slack.com >>> #capsule channel --> diff --git a/.github/actions/exists/action.yaml b/.github/actions/exists/action.yaml new file mode 100644 index 00000000..7f9c6ddc --- /dev/null +++ b/.github/actions/exists/action.yaml @@ -0,0 +1,21 @@ +name: Checks if an input is defined + +description: Checks if an input is defined and outputs 'true' or 'false'. + +inputs: + value: + description: value to test + required: true + +outputs: + result: + description: outputs 'true' or 'false' if input value is defined or not + value: ${{ steps.check.outputs.result }} + +runs: + using: composite + steps: + - shell: bash + id: check + run: | + echo "result=${{ inputs.value != '' }}" >> $GITHUB_OUTPUT \ No newline at end of file diff --git a/.github/actions/setup-caches/action.yaml b/.github/actions/setup-caches/action.yaml new file mode 100644 index 00000000..622c54d4 --- /dev/null +++ b/.github/actions/setup-caches/action.yaml @@ -0,0 +1,20 @@ +name: Setup caches + +description: Setup caches for go modules and build cache. + +inputs: + build-cache-key: + description: build cache prefix + +runs: + using: composite + steps: + - uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # v3.2.2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('**/go.sum') }}-${{ hashFiles('Makefile') }} + - uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # v3.2.2 + if: ${{ inputs.build-cache-key }} + with: + path: ~/.cache/go-build + key: ${{ runner.os }}-build-cache-${{ inputs.build-cache-key }}-${{ hashFiles('**/go.sum') }}-${{ hashFiles('Makefile') }} \ No newline at end of file diff --git a/.github/configs/ct.yaml b/.github/configs/ct.yaml index 29160c1d..af598575 100644 --- a/.github/configs/ct.yaml +++ b/.github/configs/ct.yaml @@ -1,5 +1,5 @@ remote: origin -target-branch: master +target-branch: main chart-dirs: - charts helm-extra-args: "--timeout 600s" diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..df09b6d7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: + - package-ecosystem: gomod + directory: / + schedule: + interval: daily + rebase-strategy: disabled + commit-message: + prefix: "feat(deps)" + - package-ecosystem: github-actions + directory: / + schedule: + interval: daily + rebase-strategy: disabled + commit-message: + prefix: "ci"