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

chore: create workflow to update makefile dependencies #173

Merged
merged 2 commits into from
Nov 13, 2023
Merged
Changes from 1 commit
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
40 changes: 40 additions & 0 deletions .github/workflows/dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Custom Dependabot
on:
schedule:
- cron: '0 0 * * *'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How often is this? add a comment IMO

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: AdminConsole
run: |
export VERSION=`curl https://api.github.com/repos/replicatedhq/kots-helm/tags | jq -r .[].name | grep -v alpha | head -1 | tr -d v`
sed -i "/^ADMIN_CONSOLE_CHART_VERSION/c\ADMIN_CONSOLE_CHART_NAME = $VERSION" Makefile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're changing the env var name here

ADMIN_CONSOLE_CHART_VERSION/c\ADMIN_CONSOLE_CHART_NAME

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, fixed. Thanks.

- name: Embedded Cluster Operator
run: |
export VERSION=`curl https://api.github.com/repos/replicatedhq/embedded-cluster-operator/tags | jq -r .[].name | head -1 | tr -d v`
sed -i "/^EMBEDDED_OPERATOR_CHART_VERSION/c\EMBEDDED_OPERATOR_CHART_VERSION = $VERSION" Makefile
ricardomaraschini marked this conversation as resolved.
Show resolved Hide resolved
- name: OpenEBS
run: |
export VERSION=`curl https://api.github.com/repos/openebs/charts/releases/latest | jq -r .name | tr -d openebs-`
sed -i "/^OPENEBS_CHART_VERSION/c\OPENEBS_CHART_VERSION = $VERSION" Makefile
- name: Kubectl
run: |
export VERSION=`curl -L -s https://dl.k8s.io/release/stable.txt`
sed -i "/^KUBECTL_VERSION/c\KUBECTL_VERSION = $VERSION" Makefile
- name: K0sctl
run: |
export VERSION=`curl https://api.github.com/repos/k0sproject/k0sctl/releases/latest | jq -r .name`
sed -i "/^K0SCTL_VERSION/c\K0SCTL_VERSION = $VERSION" Makefile
- name: K0s
run: |
export VERSION=`curl https://api.github.com/repos/k0sproject/k0s/releases/latest | jq -r .name`
sed -i "/^K0S_VERSION/c\K0S_VERSION = $VERSION" Makefile
- name: Troubleshoot
run: |
export VERSION=`curl https://api.github.com/repos/replicatedhq/troubleshoot/releases/latest | jq -r .name`
sed -i "/^TROUBLESHOOT_VERSION/c\TROUBLESHOOT_VERSION = $VERSION" Makefile
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5