Skip to content

fix(deps): update all non-major dependencies #51

fix(deps): update all non-major dependencies

fix(deps): update all non-major dependencies #51

name: Build and Publish Cache Updater Docker Image
on:
push:
branches: [ "main" ]
paths:
- 'cache-updater/**'
- '.github/workflows/docker-publish-cache-updater.yml'
pull_request:
branches: [ "main" ]
paths:
- 'cache-updater/**'
- '.github/workflows/docker-publish-cache-updater.yml'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/cache-updater
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha,prefix={{date 'YYYYMMDD'}}-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: ./cache-updater
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max