Skip to content

Commit

Permalink
updatecli: enable dependabot, refactor and use signed commits (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored May 13, 2024
1 parent 6472faf commit 4743a25
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ inputs:
vaultSecretId:
description: 'Vault secret ID'
required: true
command:
description: 'What updatecli command'
default: 'apply'
required: false

runs:
using: "composite"
Expand All @@ -37,6 +41,7 @@ runs:
vaultUrl: ${{ inputs.vaultUrl }}
vaultRoleId: ${{ inputs.vaultRoleId }}
vaultSecretId: ${{ inputs.vaultSecretId }}
command: ${{ inputs.command }}
pipeline: ./.buildkite/bump-golang.yml
notifySlackChannel: ${{ inputs.notifySlackChannel }}
messageIfFailure: ${{ inputs.messageIfFailure }}
Expand Down
27 changes: 27 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
version: 2
updates:

# GitHub actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
time: "22:00"
groups:
github-actions:
patterns:
- "*"

# GitHub composite actions
- package-ecosystem: "github-actions"
directory: "/.github/actions/bump-golang"
schedule:
interval: "weekly"
day: "sunday"
time: "22:00"
groups:
github-actions:
patterns:
- "*"
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ scms:
githubConfig:
kind: github
spec:
user: '{{ requiredEnv "GIT_USER" }}'
email: '{{ requiredEnv "GIT_EMAIL" }}'
user: '{{ requiredEnv "GITHUB_ACTOR" }}'
owner: elastic
repository: golang-crossbuild
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
username: '{{ requiredEnv "GIT_USER" }}'
branch: '{{ requiredEnv "BRANCH" }}'
commitusingapi: true

actions:
default:
Expand Down Expand Up @@ -108,6 +107,6 @@ targets:
sourceid: latestGoVersion
scmid: githubConfig
spec:
command: .buildkite/bump-go-release-version.sh
command: .github/updatecli.d/bump-go-release-version.sh
environments:
- name: PATH
5 changes: 3 additions & 2 deletions .github/workflows/bump-golang-previous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
bump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/bump-golang
- uses: actions/checkout@v4
- uses: ./.github/actions/bump-golang
with:
# NOTE: when a new golang version please update me with 1.<go-version-1>
branch: '1.21'
Expand All @@ -23,3 +23,4 @@ jobs:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
command: '--experimental apply'
5 changes: 3 additions & 2 deletions .github/workflows/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ jobs:
bump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/bump-golang
- uses: actions/checkout@v4
- uses: ./.github/actions/bump-golang
with:
branch: 'main'
# NOTE: when a new golang version please update me with 1.<go-version>
go-minor: '1.22'
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
command: '--experimental apply'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ With every new version of `go` we made a new branch with the name of the previou
1. Update the Go version in [.go-version](https://github.com/elastic/golang-crossbuild/blob/main/.go-version).
1. Update the Docker tag in
[Makefile.common](https://github.com/elastic/golang-crossbuild/blob/main/go/Makefile.common#L5).
1. Run `.buildkite/bump-go-release-version.sh "$(cat .go-version)"`
1. Run `.github/updatecli.d/bump-go-release-version.sh "$(cat .go-version)"`
1. Update the versions listed in this README.md.
1. Update the `go-minor` value in [bump-golang.yml](https://github.com/elastic/golang-crossbuild/blob/main/github/workflows/bump-golang.yml) with the new minor go version, i.e: `1.22`.
1. Update the `go-minor` and `branch` values in [bump-golang-previous.yml](https://github.com/elastic/golang-crossbuild/blob/main/github/workflows/bump-golang-previous.yml) with the old minor go version, i.e: `1.21`.
Expand Down

0 comments on commit 4743a25

Please sign in to comment.