Skip to content

Commit

Permalink
Update docker file tag to match dependabot-onmibus version in the Gem…
Browse files Browse the repository at this point in the history
…file
  • Loading branch information
mburumaxwell committed Sep 18, 2023
1 parent 0a8efa0 commit c60bee3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
7 changes: 0 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ updates:
- dependency-name: "rubocop*"
update-types: ["version-update:semver-patch"]

- package-ecosystem: "docker" # See documentation for possible values
directory: "/updater" # Location of package manifests
schedule:
interval: "weekly"
time: "04:00"
open-pull-requests-limit: 10

- package-ecosystem: "nuget" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
Expand Down
5 changes: 5 additions & 0 deletions copy-updater-files.ps1 → update-files.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ $versionLine = $gemfileContent | Select-String 'gem "dependabot-omnibus", "(.*)"
$version = [regex]::Match($versionLine, '"~>(\d+\.\d+\.\d+)"').Groups[1].Value
Write-Output "Found dependabot-omnibus version: $version"

# Update the version in the Dockerfile
$dockerfile = Get-Content -Path "updater/Dockerfile" -Raw
$dockerfile = ($dockerfile -replace '(?<=ARG DEPENDABOT_VERSION=)(\d+\.\d+\.\d+)', $version).Trim()
$dockerfile | Set-Content -Path "updater/Dockerfile"

# Prepare the list of files to be downloaded
$files = @(
".ruby-version"
Expand Down
4 changes: 2 additions & 2 deletions updater/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#TODO: find out how to lock the base image version
ARG ECOSYSTEM
FROM ghcr.io/dependabot/dependabot-updater-$ECOSYSTEM
ARG DEPENDABOT_VERSION=0.232.0
FROM ghcr.io/dependabot/dependabot-updater-$ECOSYSTEM:$DEPENDABOT_VERSION

# ENV DEPENDABOT_HOME /home/dependabot
WORKDIR ${DEPENDABOT_HOME}
Expand Down

0 comments on commit c60bee3

Please sign in to comment.