-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add updateli to handle dependency (#25)
Signed-off-by: Olivier Vernin <[email protected]>
- Loading branch information
Showing
7 changed files
with
146 additions
and
0 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,47 @@ | ||
name: updatecli | ||
on: | ||
release: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
schedule: | ||
# Run every hour | ||
- cron: "0 * * * *" | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
updatecli: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v4" | ||
- name: "Setup updatecli" | ||
uses: "updatecli/updatecli-action@v2" | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: "go.mod" | ||
id: go | ||
- name: "Run updatecli in dryrun" | ||
run: "updatecli compose diff" | ||
env: | ||
GITHUB_ACTOR: ${{ github.actor }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: tibdex/[email protected] | ||
id: generate_token | ||
if: github.ref == 'refs/heads/main' | ||
with: | ||
app_id: ${{ secrets.UPDATECLIBOT_APP_ID }} | ||
private_key: ${{ secrets.UPDATECLIBOT_APP_PRIVKEY }} | ||
- name: "Run updatecli" | ||
if: github.ref == 'refs/heads/main' | ||
run: "updatecli compose apply" | ||
env: | ||
GITHUB_ACTOR: ${{ secrets.UPDATECLI_BOT_GITHUB_ACTOR }} | ||
GITHUB_TOKEN: ${{ steps.generate_token.outputs.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,35 @@ | ||
policies: | ||
|
||
- name: Update Updatecli policies | ||
policy: ghcr.io/updatecli/policies/updatecli/autodiscovery:0.2.0@sha256:46e599fb7e874ee3f1c9cf5e4dd64b328a15d61d03e106176b19a07683afde29 | ||
values: | ||
- updatecli/values.d/scm.yaml | ||
- updatecli/values.d/update-compose.yaml | ||
|
||
- name: Golang Version | ||
policy: ghcr.io/updatecli/policies/golang/version:0.1.0 | ||
values: | ||
- updatecli/values.d/scm.yaml | ||
|
||
- name: Major Golang Module update | ||
policy: ghcr.io/updatecli/policies/autodiscovery/golang:0.6.0 | ||
values: | ||
- updatecli/values.d/scm.yaml | ||
- updatecli/values.d/golang_major.yaml | ||
|
||
- name: Minor Golang Module update | ||
policy: ghcr.io/updatecli/policies/autodiscovery/golang:0.6.0 | ||
values: | ||
- updatecli/values.d/scm.yaml | ||
- updatecli/values.d/golang_minor.yaml | ||
|
||
- name: Patch Golang Module update | ||
policy: ghcr.io/updatecli/policies/autodiscovery/golang:0.6.0 | ||
values: | ||
- updatecli/values.d/scm.yaml | ||
- updatecli/values.d/golang_patch.yaml | ||
|
||
- name: Update golangci-lint | ||
policy: ghcr.io/updatecli/policies/golangci-lint/githubaction:0.1.0 | ||
values: | ||
- updatecli/values.d/scm.yaml |
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,18 @@ | ||
name: "deps(golang): Bump Major version for Golang module" | ||
pipelineid: "golang/gomod/major" | ||
groupby: all | ||
|
||
spec: | ||
versionfilter: | ||
kind: semver | ||
pattern: majoronly | ||
ignore: | ||
- modules: | ||
# Ignoring the following modules as they do not publish release | ||
github.com/shurcooL/githubv4: "" | ||
|
||
only: | ||
# This repository contains other go.sum file used for testing. | ||
# So we want to be sure that we only update the one at the root of the repository | ||
- path: "go.mod" | ||
|
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,18 @@ | ||
name: "deps(golang): Bump Minor version for Golang module" | ||
pipelineid: "golang/gomod/minor" | ||
groupby: individual | ||
|
||
spec: | ||
versionfilter: | ||
kind: semver | ||
pattern: minoronly | ||
ignore: | ||
- modules: | ||
# Ignoring the following modules as they do not publish release | ||
github.com/shurcooL/githubv4: "" | ||
|
||
only: | ||
# This repository contains other go.sum file used for testing. | ||
# So we want to be sure that we only update the one at the root of the repository | ||
- path: "go.mod" | ||
|
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,17 @@ | ||
name: "deps: bump patch version for Golang module" | ||
pipelineid: "golang/gomod/patch" | ||
|
||
spec: | ||
versionfilter: | ||
kind: semver | ||
pattern: patch | ||
ignore: | ||
- modules: | ||
# Ignoring the following modules as they do not publish release | ||
github.com/shurcooL/githubv4: "" | ||
|
||
only: | ||
# This repository contains other go.sum file used for testing. | ||
# So we want to be sure that we only update the one at the root of the repository | ||
- path: "go.mod" | ||
|
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,8 @@ | ||
scm: | ||
enabled: true | ||
user: updatecli | ||
email: [email protected] | ||
owner: updatecli | ||
repository: releasepost | ||
username: "updatecli-bot" | ||
branch: main |
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,3 @@ | ||
spec: | ||
files: | ||
- "update-compose.yaml" |