-
Notifications
You must be signed in to change notification settings - Fork 51
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 #220 from olblak/automateVersionUpdate
ci: automate wiremock version update
- Loading branch information
Showing
2 changed files
with
98 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,66 @@ | ||
name: 'Bump WireMock version' | ||
pipelineid: "wiremock" | ||
|
||
actions: | ||
default: | ||
title: 'docs: update WireMock version to {{ source "wiremock" }}' | ||
kind: github/pullrequest | ||
scmid: default | ||
spec: | ||
automerge: false | ||
mergemethod: squash | ||
labels: | ||
- documentation | ||
|
||
scms: | ||
default: | ||
kind: github | ||
spec: | ||
user: wiremock-bot | ||
email: [email protected] | ||
owner: wiremock | ||
repository: wiremock.org | ||
token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
username: '{{ requiredEnv "GITHUB_ACTOR" }}' | ||
branch: main | ||
|
||
sources: | ||
wiremock: | ||
name: Get latest WireMock version | ||
kind: githubrelease | ||
spec: | ||
owner: wiremock | ||
repository: wiremock | ||
token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
versionfilter: | ||
kind: semver | ||
|
||
conditions: | ||
docker: | ||
name: 'Check that a docker image is available for the latest version' | ||
kind: dockerimage | ||
spec: | ||
image: wiremock/wiremock | ||
architecture: amd64 | ||
|
||
targets: | ||
wiremock_version: | ||
name: 'docs: update WireMock version to {{ source "wiremock" }}' | ||
kind: yaml | ||
scmid: default | ||
spec: | ||
file: _config.yml | ||
key: "$.wiremock_version" | ||
|
||
wiremock_baseline: | ||
name: 'docs: update WireMock baseline to {{ source "wiremock" }}' | ||
kind: yaml | ||
scmid: default | ||
spec: | ||
file: _config.yml | ||
key: "$.wiremock_baseline" | ||
transformers: | ||
- findsubmatch: | ||
pattern: '^(\d*).' | ||
captureindex: 1 | ||
- addsuffix: '.x' |
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,32 @@ | ||
--- | ||
name: "Updatecli" | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# * is a special character in YAML so you have to quote this string | ||
# trigger every hour the following pipeline | ||
- cron: '0 * * * *' | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
updatecli: | ||
runs-on: ubuntu-latest | ||
# Ensure we only run the following pipeline from main branch | ||
# with a GITHUB_TOKEN that has "contents: write" permission | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Updatecli Binary | ||
uses: updatecli/updatecli-action@v2 | ||
|
||
- name: Run Updatecli in enforce mode | ||
run: "updatecli apply --config .github/updatecli/updatecli.d" | ||
env: | ||
GITHUB_ACTOR: ${{ github.actor }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |