Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few suggestion #5

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions .github/workflows/helm-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install updatecli
run: |
sudo apt-get update -y
sudo curl -LO https://github.com/updatecli/updatecli/releases/download/v0.80.0/updatecli_Linux_x86_64.tar.gz
sudo tar -zxvf updatecli_Linux_x86_64.tar.gz
sudo mv updatecli /usr/local/bin
updatecli version
- name: Install Updatecli in the runner
uses: updatecli/updatecli-action@v2

- name: Run updatecli
run: |
updatecli apply --config updatecli.d/updatecli.yaml --debug
updatecli apply --config updatecli.d
env:
# Using the default GitHub Token means we have 1000 api requests per hour
UPDATECLI_GITHUB_ACTOR: ${{ github.actor }}
UPDATECLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
# updatecli-PR
updatecli-PR

To run this updatecli script, you can run the following commands:

```
export UPDATECLI_GITHUB_ACTOR=akash911133
export UPDATECLI_GITHUB_TOKEN=ghx_xxxx
updatecli compose apply --file .github/updatecli/update-compose.yaml
updatecli apply --config updatecli.d
41 changes: 18 additions & 23 deletions updatecli.d/updatecli.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,47 @@
# updatecli.yaml
name: Update a file content and open a GitHub Pull Request
name: "deps: update cluster-autoscaler version in input.tf"
scms:
default:
kind: "github"
id: default
spec:
user: "Akash Ughade"
email: "[email protected]"
owner: "akash911133"
repository: "updatecli-PR"
token: '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'
username: 'akash911133'
token: '{{ requiredEnv "UPDATECLI_GITHUB_TOKEN" }}'
username: '{{ requiredEnv "UPDATECLI_GITHUB_ACTOR" }}'
branch: "main"
commitmessage:
type: "feat"
title: "Updating version of helm chart"
body: "updated latest version in data.yaml"
hidecredit: true

actions:
default:
kind: "github/pullrequest"
scmid: default
target:
- chart-cluster-autoscaler
scmid: "default"
spec:
automerge: false
description: "Creating a pull request 1"
draft: true
labels:
- "Dependencies"
- "dependencies"
title: "Update git_repo_scanner helm chart version"

sources:
chart-cluster-autoscaler:
kind: helmchart
pattern: "*"
name: "Get the latest version of cluster-autoscaler helm chart"
kind: "helmchart"
spec:
name: cluster-autoscaler
url: https://kubernetes.github.io/autoscaler
version: latest
name: "cluster-autoscaler"
url: "https://kubernetes.github.io/autoscaler"
versionfilter:
kind: "semver"
pattern: "*"

targets:
chart-cluster-autoscaler:
name: Update cluster-autoscaler version in input.tf
kind: terraform/file
sourceid: chart-cluster-autoscaler
scmid: default
name: 'deps: update cluster-autoscaler version in input.tf to {{ source "chart-cluster-autoscaler" }}'
kind: "terraform/file"
sourceid: "chart-cluster-autoscaler"
scmid: "default"
spec:
file: ../templates/eks/input.tf
path: variable.CLUSTER_AUTOSCALER_HELM_CHART_VERSION.default
file: "templates/eks/input.tf"
path: "variable.CLUSTER_AUTOSCALER_HELM_CHART_VERSION.default"