Skip to content

chore(dependencies): Update dependency pre-commit to v3.8.0 #182

chore(dependencies): Update dependency pre-commit to v3.8.0

chore(dependencies): Update dependency pre-commit to v3.8.0 #182

Workflow file for this run

---
name: "Main"
"on":
push:
pull_request:
jobs:
pre-commit-job:
runs-on: "ubuntu-22.04"
steps:
- name: "Checkout repository"
uses: "actions/[email protected]"
- name: "Set up python and pip cache"
uses: "actions/[email protected]"
with:
python-version: "3.11.4"
cache: "pip"
- name: "Install python dependencies"
run: "pip install -r requirements.txt"
- name: "Set up pre-commit cache"
uses: "actions/[email protected]"
with:
path: "~/.cache/pre-commit"
key: "pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}"
- name: "Run pre-commit"
run: "pre-commit run --all-files --color=always --show-diff-on-failure"
helm-lint-job:
runs-on: "ubuntu-22.04"
container:
image: "alpine/helm:3.15.2"
steps:
- name: "Checkout repository"
uses: "actions/[email protected]"
- name: "Run 'helm lint'"
run: "helm lint ./charts/grafaml"
kube-linter-lint-job:
runs-on: "ubuntu-22.04"
steps:
- name: "Checkout repository"
uses: "actions/[email protected]"
- name: "Run 'kube-linter'"
uses: "stackrox/[email protected]"
with:
directory: "./charts/grafaml"
helm-test-job:
runs-on: "ubuntu-22.04"
container:
image: "alpine/helm:3.15.2"
steps:
- name: "Checkout repository"
uses: "actions/[email protected]"
- name: "Install 'Helm Unittest'"
run: "helm plugin install https://github.com/helm-unittest/helm-unittest.git"
- name: "Run 'helm unittest'"
run: "helm unittest ./charts/grafaml"
determine-version-job:
runs-on: "ubuntu-22.04"
permissions:
contents: "write"
issues: "write"
pull-requests: "write"
outputs:
version: "${{ steps.determineVersion.outputs.version }}"
steps:
- name: "Checkout repository"
uses: "actions/[email protected]"
- name: "Set up node and yarn"
uses: "actions/[email protected]"
with:
node-version: "20.11.0"
- name: "Install semantic-release"
run: "yarn add semantic-release"
- name: "Determine version"
id: "determineVersion"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: >-
echo version="$(npx semantic-release --dry-run |
grep -Po '(?<=t|The next release version is )\d+\.\d+\.\d+(?:-[a-zA-Z0-9.]+)?')"
>> "$GITHUB_OUTPUT"
- name: "Echo new version"
run: "echo \"The new version is ${{ steps.determineVersion.outputs.version }}\""
helm-push-job:
needs:
- "pre-commit-job"
- "helm-lint-job"
- "kube-linter-lint-job"
- "helm-test-job"
- "determine-version-job"
if: "needs.determine-version-job.outputs.version != ''"
runs-on: "ubuntu-22.04"
container:
image: "alpine/helm:3.15.2"
steps:
- name: "Checkout repository"
uses: "actions/[email protected]"
- name: "Echo new version"
run: "echo \"The package will be released with version ${{ needs.determine-version-job.outputs.version }}\""
- name: "Run 'helm package'"
run: "helm package ./charts/grafaml --version ${{ needs.determine-version-job.outputs.version }}"
- name: "Run 'helm registry login'"
run: "helm registry login registry-1.docker.io --username ernail --password ${{ secrets.DOCKER_REGISTRY_TOKEN }}"
- name: "Run 'helm push'"
run: "helm push grafaml-${{ needs.determine-version-job.outputs.version }}.tgz oci://registry-1.docker.io/ernail"
semantic-release-job:
needs:
- "helm-push-job"
runs-on: "ubuntu-22.04"
permissions:
contents: "write"
issues: "write"
pull-requests: "write"
steps:
- name: "Checkout repository"
uses: "actions/[email protected]"
with:
persist-credentials: false
- name: "Set up node and yarn"
uses: "actions/[email protected]"
with:
node-version: "20.11.0"
- name: "Install semantic-release"
run: "yarn add semantic-release"
- name: "Run semantic-release"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: "npx semantic-release"