diff --git a/.github/renovate.json b/.github/renovate.json index b1556271..f7b20801 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -4,7 +4,22 @@ "config:recommended" ], "enabledManagers": [ - "github-actions" + "github-actions", + "regex" + ], + "regexManagers": [ + { + "fileMatch": [ + "^docker-compose\\.yml$", + "^relay/docker-compose\\.yml$" + ], + "matchStrings": [ + "image:\\s*obolnetwork/charon:\\$\\{CHARON_VERSION:-v?(?[\\w.-]+)}" + ], + "datasourceTemplate": "github-releases", + "depNameTemplate": "ObolNetwork/charon", + "versioningTemplate": "semver" + } ], "packageRules": [ { @@ -24,6 +39,18 @@ "renovate/github-actions" ], "groupName": "GitHub Actions updates" + }, + { + "matchManagers": [ + "regex" + ], + "matchDepNames": [ + "ObolNetwork/charon" + ], + "labels": [ + "renovate/charon" + ], + "groupName": "Charon image updates" } ] } diff --git a/.github/workflows/dispath-update.yml b/.github/workflows/dispath-update.yml deleted file mode 100644 index d8f00808..00000000 --- a/.github/workflows/dispath-update.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Dispatch Update Version - -on: - repository_dispatch: - types: [update-version] - -jobs: - update-version: - runs-on: ubuntu-latest - steps: - - name: Checkout this repository - uses: actions/checkout@v6 - - - name: Extract tag name - run: echo "TAG_NAME=${{ github.event.client_payload.tag }}" >> $GITHUB_ENV - - - name: Update version in Ansible configuration - run: | - TAG_NAME="$(echo "${TAG_NAME}" | sed 's/^v//')" - - sed -i -E 's|(image: obolnetwork/charon:\$\{CHARON_VERSION:-)v\.?[0-9]+\.[0-9]+\.[0-9]+[a-zA-Z0-9\-]*}|\1v'"${TAG_NAME}"'}|' docker-compose.yml - sed -i -E 's|(image: obolnetwork/charon:\$\{CHARON_VERSION:-)v\.?[0-9]+\.[0-9]+\.[0-9]+[a-zA-Z0-9\-]*}|\1v'"${TAG_NAME}"'}|' relay/docker-compose.yml - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v8 - with: - token: ${{ secrets.GITHUB_TOKEN }} - base: main - branch: update-version-${{ env.TAG_NAME }} - title: "Update version to ${{ env.TAG_NAME }}" - body: "Automatically generated PR to update version to ${{ env.TAG_NAME }}" - commit-message: "Update version to ${{ env.TAG_NAME }}" - author-name: "obol-platform" - author-email: "platform@obol.tech"