Skip to content

WireMock Sync

WireMock Sync #31

Workflow file for this run

name: WireMock Sync
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
sync:
runs-on: ubuntu-latest
name: WireMock Sync
steps:
- uses: actions/checkout@v4
with:
#repository: wiremock/wiremock
#token: ${{ secrets.WIREMOCK_SYNC_PAT }}
#ref: master
fetch-depth: 0
- id: wiremock-remote
name: Add WireMock remote
run: |
#!/bin/bash
git remote add upstream https://github.com/wiremock/wiremock.git
git fetch upstream
- id: wiremock-version
name: Check WireMock Version
env:
GH_TOKEN: ${{ github.token }}
run: |
#!/bin/bash
# Check latest semver tag:
echo "Searching for latest semver"
wiremockVersion=$(git tag -l --sort=-version:refname | grep -P '^\d+\.\d+\.\d+$' -m 1)
echo "wiremockVersion=${wiremockVersion}" >> $GITHUB_OUTPUT
echo "Found wiremockVersion=${wiremockVersion}"
gh release list --exclude-drafts --exclude-pre-releases --repo holomekc/wiremock | grep "latest"
guiVersion=$(gh release list --exclude-drafts --exclude-pre-releases --repo holomekc/wiremock | grep "latest" | awk '{print $1}')
echo "guiVersion=${guiVersion}" >> $GITHUB_OUTPUT
echo "Found guiVersion=${guiVersion}"
echo "Checking if WireMock version > WireMock-Gui version."
echo "${wiremockVersion} > ${guiVersion}"