Bumps the github-actions group with 2 updates: [docker/build-push-action](https://github.com/docker/build-push-action) and [docker/metadata-action](https://github.com/docker/metadata-action). Updates `docker/build-push-action` from 83bfd93ab480705a7b99a2ed02765137f5ab55ba to bcafcacb16a39f128d818304e6c9c0c18556b85f - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/83bfd93ab480705a7b99a2ed02765137f5ab55ba...bcafcacb16a39f128d818304e6c9c0c18556b85f) Updates `docker/metadata-action` from c3b064c6d7c32446d6bc214ea075f1caad2de35a to a7807070e67ad478bd5f672f499303a151742e53 - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/c3b064c6d7c32446d6bc214ea075f1caad2de35a...a7807070e67ad478bd5f672f499303a151742e53) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-version: bcafcacb16a39f128d818304e6c9c0c18556b85f dependency-type: direct:production dependency-group: github-actions - dependency-name: docker/metadata-action dependency-version: a7807070e67ad478bd5f672f499303a151742e53 dependency-type: direct:production dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
69 lines
1.9 KiB
YAML
69 lines
1.9 KiB
YAML
name: Container Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- v*
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
env:
|
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
|
|
concurrency:
|
|
group: image-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
docker:
|
|
name: Build container image
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Prepare licensed assets
|
|
run: node ./scripts/prepare-licensed-assets.cjs
|
|
|
|
- name: Derive image name
|
|
id: vars
|
|
run: echo "image_name=ghcr.io/${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v4
|
|
|
|
- name: Extract image metadata
|
|
id: meta
|
|
uses: docker/metadata-action@a7807070e67ad478bd5f672f499303a151742e53
|
|
with:
|
|
images: ${{ steps.vars.outputs.image_name }}
|
|
tags: |
|
|
type=ref,event=branch
|
|
type=ref,event=tag
|
|
type=sha,prefix=sha-
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
if: github.event_name != 'pull_request'
|
|
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and optionally publish image
|
|
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f
|
|
with:
|
|
context: .
|
|
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
|