mirror of
https://github.com/librespeed/speedtest.git
synced 2026-08-04 14:48:38 +00:00
Merge pull request #631 from rare-magma/add-alpine-docker-image
Add alpine docker image version
This commit is contained in:
commit
79436f0f0d
4 changed files with 101 additions and 10 deletions
25
.github/workflows/docker-publish.yml
vendored
25
.github/workflows/docker-publish.yml
vendored
|
|
@ -26,6 +26,16 @@ env:
|
|||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- dockerfile: ./Dockerfile
|
||||
image: ghcr.io/${{ github.repository }}
|
||||
flavour: ""
|
||||
- dockerfile: ./Dockerfile.alpine
|
||||
image: ghcr.io/${{ github.repository }}
|
||||
flavour: "-alpine"
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
|
@ -69,14 +79,16 @@ jobs:
|
|||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
images: ${{ matrix.image }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=ref,event=branch,suffix=${{ matrix.flavour }}
|
||||
type=ref,event=pr,suffix=${{ matrix.flavour }}
|
||||
# set latest tag for default branch
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=raw,value=latest${{ matrix.flavour }},enable={{is_default_branch}}
|
||||
type=semver,pattern={{version}}${{ matrix.flavour }}
|
||||
type=semver,pattern={{major}}${{ matrix.flavour }}
|
||||
type=semver,pattern={{major}}.{{minor}}${{ matrix.flavour }}
|
||||
type=semver,pattern={{major}}.{{minor}}.{{patch}}${{ matrix.flavour }}
|
||||
|
||||
# Build and push Docker image with Buildx (don't push on PR)
|
||||
# https://github.com/docker/build-push-action
|
||||
|
|
@ -85,6 +97,7 @@ jobs:
|
|||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ${{ matrix.dockerfile }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue