-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sample to use updatecli to update mysql image
- Loading branch information
Showing
3 changed files
with
88 additions
and
2 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,44 @@ | ||
--- | ||
name: Update versions of integrations services. | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 1 * * 1-5' | ||
pull_request: | ||
paths: | ||
- .github/updatecli-packages.d/* | ||
- .github/workflows/bump-integration-services.yml | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
bump-mysql-version: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Updatecli in the runner | ||
uses: updatecli/[email protected] | ||
|
||
- name: Select diff action | ||
if: ${{ github.event_name == 'pull_request' }} | ||
run: | | ||
echo "UPDATECLI_ACTION=diff" >> $GITHUB_ENV | ||
- name: Select apply action | ||
if: ${{ github.event_name != 'pull_request' }} | ||
run: | | ||
echo "UPDATECLI_ACTION=apply" >> $GITHUB_ENV | ||
- name: Update mysql services. | ||
# --experimental needed for commitusingapi option. | ||
run: updatecli --experimental ${{ env.UPDATECLI_ACTION }} --config .github/workflows/updatecli-packages.d/mysql.yml --values .github/workflows/updatecli.d/scm.yml | ||
env: | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
name: Bump latest mysql service test version | ||
pipelineid: 'bump-latest-mysql-variant-version' | ||
|
||
actions: | ||
default: | ||
title: '[updatecli] Update latest mysql version to {{ source "latest" }}' | ||
kind: github/pullrequest | ||
scmid: default | ||
spec: | ||
labels: | ||
- automation | ||
- dependency | ||
|
||
scms: | ||
default: | ||
kind: github | ||
spec: | ||
owner: '{{ .scm.owner }}' | ||
repository: '{{ .scm.repository }}' | ||
user: '{{ requiredEnv "GITHUB_ACTOR" }}' | ||
token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
commitusingapi: true | ||
branch: main | ||
|
||
sources: | ||
latest: | ||
kind: dockerimage | ||
spec: | ||
image: mysql | ||
architecture: "linux/amd64" | ||
kind: latest | ||
tagfilter: '^8.\d*.\d*$' | ||
|
||
targets: | ||
mysqlTag: | ||
name: "mysql variant" | ||
kind: file | ||
spec: | ||
file: "packages/mysql/_dev/deploy/variants.yml" | ||
matchpattern: '(IMAGE: mysql:)8.*' | ||
replacepattern: '${1}{{ source "latest" }}' |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
variants: | ||
mysql_8_0_35: | ||
mysql_8: | ||
IMAGE: mysql:8.0.35 | ||
percona_8_0_36: | ||
IMAGE: percona:8.0.34-26 | ||
default: mysql_8_0_35 | ||
default: mysql_8 |