Fix malformed Git timestamp crash bug #527
Workflow file for this run
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: Docker | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- name: debian | |
dockerfile: Dockerfile | |
image: ghcr.io/${{ github.repository }} | |
- name: alpine | |
dockerfile: Dockerfile.alpine | |
image: ghcr.io/${{ github.repository }}-alpine | |
name: Docker (${{ matrix.name }}) | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
# The following for multi-platform build; disabled here because it takes so long; see #39. | |
# | |
# The docker image built for noseyparker releases is done in the | |
# `release-artifacts.yml` file. | |
# | |
# - uses: docker/setup-qemu-action@v2 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Build Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
cache-from: type=gha,scope=${{ matrix.dockerfile }} | |
cache-to: type=gha,scope=${{ matrix.dockerfile }},mode=min | |
context: . | |
file: ${{ matrix.dockerfile }} | |
tags: ${{ matrix.image }}:edge | |
push: false | |
# For multi-platform builds | |
# platforms: linux/amd64,linux/arm64 | |
load: true | |
pull: true | |
labels: | | |
org.opencontainers.image.title=${{ github.event.repository.name }} | |
org.opencontainers.image.description=${{ github.event.repository.description }} | |
org.opencontainers.image.url=${{ github.event.repository.html_url }} | |
org.opencontainers.image.source=${{ github.event.repository.clone_url }} | |
org.opencontainers.image.revision=${{ github.sha }} | |
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }} | |
- name: Test the Docker image | |
run: docker run --rm "${{ matrix.image }}:edge" --version | |
# We need to authenticate with GHCR both to push the tagged image for the | |
# `main` branch | |
- name: Authenticate with GitHub Container Registry | |
if: github.event_name == 'push' && github.ref_name == 'main' | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push the image to `edge` | |
if: github.event_name == 'push' && github.ref_name == 'main' | |
run: | | |
docker push "${{ matrix.image }}:edge" |