-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from gounthar/updatecli
Updatecli
- Loading branch information
Showing
6 changed files
with
122 additions
and
4 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,43 @@ | ||
# This is a GitHub Actions workflow named "updatecli" | ||
name: updatecli | ||
on: | ||
# This workflow can be triggered manually | ||
workflow_dispatch: | ||
# This workflow is scheduled to run once per week (to avoid alert fatigue) | ||
# Specifically, it runs every Monday at 2am UTC | ||
schedule: | ||
- cron: '0 2 * * 1' | ||
# This workflow is also triggered on every push event | ||
push: | ||
# This workflow is also triggered on every pull request event | ||
pull_request: | ||
jobs: | ||
# This job is named "updatecli" | ||
updatecli: | ||
# This job runs on the latest version of Ubuntu | ||
runs-on: ubuntu-latest | ||
steps: | ||
# This step checks out the repository using the checkout action | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# This step installs Updatecli in the runner using the updatecli-action | ||
- name: Install Updatecli in the runner | ||
uses: updatecli/[email protected] | ||
|
||
# This step runs Updatecli in Dry Run mode | ||
# It uses the "diff" command of updatecli with the specified config and values files | ||
# The GitHub token is passed as an environment variable | ||
- name: Run Updatecli in Dry Run mode | ||
run: updatecli diff --config ./updatecli/updatecli.d --values ./updatecli/values.github-action.yaml | ||
env: | ||
UPDATECLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# This step runs Updatecli in Apply mode, but only if the current branch is 'master' | ||
# It uses the "apply" command of updatecli with the specified config and values files | ||
# The GitHub token is passed as an environment variable | ||
- name: Run Updatecli in Apply mode | ||
if: github.ref == 'refs/heads/master' | ||
run: updatecli apply --config ./updatecli/updatecli.d --values ./updatecli/values.github-action.yaml | ||
env: | ||
UPDATECLI_GITHUB_TOKEN: ${{ secrets.GITHUB_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
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
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
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,68 @@ | ||
--- | ||
name: Bump Docker image tag for "jenkins/ssh-agent" | ||
sources: | ||
jenkins/ssh-agent: | ||
name: '[jenkins/ssh-agent] Get latest Docker image tag' | ||
kind: dockerimage | ||
spec: | ||
image: jenkins/ssh-agent | ||
tagfilter: ^\d*(\.\d*){2}$ | ||
versionfilter: | ||
kind: semver | ||
pattern: '>=5.20.0' | ||
targets: | ||
jenkins/python-agent: | ||
name: '[jenkins/ssh-agent] Bump Docker image tag in "dockerfiles/python/Dockerfile"' | ||
kind: dockerfile | ||
spec: | ||
file: dockerfiles/python/Dockerfile | ||
instruction: | ||
keyword: FROM | ||
matcher: jenkins/ssh-agent | ||
sourceid: jenkins/ssh-agent | ||
jenkins/node-agent: | ||
name: '[jenkins/ssh-agent] Bump Docker image tag in "dockerfiles/node/Dockerfile"' | ||
kind: dockerfile | ||
spec: | ||
file: dockerfiles/node/Dockerfile | ||
instruction: | ||
keyword: FROM | ||
matcher: jenkins/ssh-agent | ||
sourceid: jenkins/ssh-agent | ||
jenkins/multibranch-agent: | ||
name: '[jenkins/ssh-agent] Bump Docker image tag in "dockerfiles/multi/Dockerfile"' | ||
kind: dockerfile | ||
spec: | ||
file: dockerfiles/multi/Dockerfile | ||
instruction: | ||
keyword: FROM | ||
matcher: jenkins/ssh-agent | ||
sourceid: jenkins/ssh-agent | ||
jenkins/maven-agent: | ||
name: '[jenkins/ssh-agent] Bump Docker image tag in "dockerfiles/maven/Dockerfile"' | ||
kind: dockerfile | ||
spec: | ||
file: dockerfiles/maven/Dockerfile | ||
instruction: | ||
keyword: FROM | ||
matcher: jenkins/ssh-agent | ||
sourceid: jenkins/ssh-agent | ||
default-agent: | ||
name: '[jenkins/ssh-agent] Bump Docker image tag in "docker-compose.yaml"' | ||
kind: yaml | ||
transformers: | ||
- addprefix: 'jenkins/ssh-agent:' | ||
spec: | ||
file: docker-compose.yaml | ||
key: $.services.default_agent.image | ||
sourceid: jenkins/ssh-agent | ||
default-build-agent: | ||
name: '[jenkins/ssh-agent] Bump Docker image tag in "build-docker-compose.yaml"' | ||
kind: yaml | ||
transformers: | ||
- addprefix: 'jenkins/ssh-agent:' | ||
spec: | ||
file: build-docker-compose.yaml | ||
key: $.services.default_agent.image | ||
sourceid: jenkins/ssh-agent | ||
|
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 @@ | ||
github: | ||
user: "GitHub Actions" | ||
email: "41898282+github-actions[bot]@users.noreply.github.com" | ||
username: "github-actions" | ||
token: "UPDATECLI_GITHUB_TOKEN" | ||
branch: "master" | ||
owner: "jenkins-docs" | ||
repository: "quickstart-tutorials" |