Provided bug fix issue no 9166. (#12002) #2596
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
name: Updater-Core image | |
env: | |
UPDATER_CORE_IMAGE: "ghcr.io/dependabot/dependabot-updater-core" | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- main | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+ | |
jobs: | |
push-updater-core-image: | |
name: Push dependabot-updater-core image to GHCR | |
runs-on: ubuntu-latest | |
if: github.repository == 'dependabot/dependabot-core' | |
permissions: | |
contents: read | |
id-token: write | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: recursive | |
- uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1 | |
- name: Build dependabot-updater-core image | |
run: script/build common | |
- uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push latest image | |
run: | | |
docker push "$UPDATER_CORE_IMAGE:latest" | |
cosign sign --yes $(cosign triangulate --type=digest "$UPDATER_CORE_IMAGE:latest") | |
- name: Push tagged image | |
if: contains(github.ref, 'refs/tags') | |
run: | | |
VERSION="$(grep -Eo "[0-9]+\.[0-9]+\.[0-9]+" common/lib/dependabot.rb)" | |
docker tag "$UPDATER_CORE_IMAGE:latest" "$UPDATER_CORE_IMAGE:$VERSION" | |
docker push "$UPDATER_CORE_IMAGE:$VERSION" |