aed9d4f567
Bumps [hadolint/hadolint-action](https://github.com/hadolint/hadolint-action) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/hadolint/hadolint-action/releases) - [Changelog](https://github.com/hadolint/hadolint-action/blob/master/.releaserc) - [Commits](https://github.com/hadolint/hadolint-action/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: hadolint/hadolint-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
name: Build container image
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
tags:
|
|
- '*'
|
|
pull_request:
|
|
paths:
|
|
- .github/workflows/build-image.yml
|
|
- Dockerfile
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build-image:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: hadolint/hadolint-action@v3.1.0
|
|
- uses: docker/setup-qemu-action@v2
|
|
- uses: docker/setup-buildx-action@v2
|
|
- uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
if: github.event_name != 'pull_request'
|
|
- uses: docker/metadata-action@v4
|
|
id: meta
|
|
with:
|
|
images: tootsuite/mastodon
|
|
flavor: |
|
|
latest=auto
|
|
tags: |
|
|
type=edge,branch=main
|
|
type=pep440,pattern={{raw}}
|
|
type=pep440,pattern=v{{major}}.{{minor}}
|
|
type=ref,event=pr
|
|
- uses: docker/build-push-action@v3
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64
|
|
builder: ${{ steps.buildx.outputs.name }}
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|