Skip to content

Merge pull request #45 from tonglil/dependabot/github_actions/docker/… #9

Merge pull request #45 from tonglil/dependabot/github_actions/docker/…

Merge pull request #45 from tonglil/dependabot/github_actions/docker/… #9

Workflow file for this run

name: Docker Variants
on:
push:
branches: [ "main" ]
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
variant:
- alpine
- slim
permissions:
actions: write
checks: write
contents: write
deployments: write
id-token: write
issues: write
pull-requests: write
security-events: write
statuses: write
steps:
- uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ github.repository }}
tags: |
type=raw,value=${{ matrix.variant }},enable={{is_default_branch}}
type=semver,pattern={{version}}-${{ matrix.variant }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}