chore(build.yml): remove unnecessary indentation in build step chore(build.yml): remove commented out platform option chore(build.yml): remove unnecessary build-args indentation chore(build.yml): remove unnecessary tags indentation
44 lines
1 KiB
YAML
44 lines
1 KiB
YAML
name: Build And Publish Docker
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "master"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
hugo-version: ["0.115.4"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@master
|
|
with:
|
|
platforms: all
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@master
|
|
|
|
- name: Login to DockerHub
|
|
if: github.event_name != 'pull_request'
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_HUB_USER }}
|
|
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
|
|
|
- name: Build
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
builder: ${{ steps.buildx.outputs.name }}
|
|
context: ./
|
|
file: ./Dockerfile
|
|
platforms: linux/amd64 # ,linux/arm64/v8
|
|
push: true
|
|
build-args: HUGO_VERSION=${{ matrix.hugo-version }}
|
|
tags: betterweb/hugo:${{ matrix.hugo-version }}-extended
|