docker-getgrav/.forgejo/workflows/build.yml
Magnus Walbeck b60c83e109
All checks were successful
Build and publish / lint (push) Successful in 7s
Build and publish / grav1_7 (push) Successful in 27m9s
Build and publish / grav1_7_prod (push) Successful in 26m46s
Fix image name
2025-05-27 20:04:44 +02:00

89 lines
2.6 KiB
YAML

name: Build and publish
on:
push:
branches:
- main
jobs:
lint:
if: github.ref != 'refs/heads/renovate/*'
runs-on: docker
steps:
- uses: actions/checkout@v4
- uses: https://github.com/hadolint/hadolint-action@v3.1.0
with:
dockerfile: ./1.7/Dockerfile
- uses: https://github.com/hadolint/hadolint-action@v3.1.0
with:
dockerfile: ./1.7/Dockerfile.prod
- uses: https://github.com/ludeeus/action-shellcheck@2.0.0
grav1_7:
runs-on: dind
steps:
- uses: actions/checkout@v4
- name: Get docker tags
id: tags
shell: sh
env:
VERSION_TYPE: "docker_env"
APP_NAME: "GRAV"
DOCKERFILE_PATH: "1.7/Dockerfile"
INCLUDE_MAJOR: "no"
CUSTOM_TAGS: "latest"
IMAGE_NAME: "mwalbeck/getgrav"
run: |
determine-docker-tags
dockerd &
- name: Login to Docker Hub
uses: https://github.com/docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: Build and push
uses: https://github.com/docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.tags.outputs.tags }}
file: ./1.7/Dockerfile
grav1_7_prod:
runs-on: dind
steps:
- uses: actions/checkout@v4
- name: Get docker tags
id: tags
shell: sh
env:
VERSION_TYPE: "docker_env"
APP_NAME: "GRAV"
APP_ENV: "prod"
DOCKERFILE_PATH: "1.7/Dockerfile.prod"
INCLUDE_MAJOR: "no"
CUSTOM_TAGS: "latest-prod"
IMAGE_NAME: "mwalbeck/getgrav"
run: |
determine-docker-tags
dockerd &
- name: Login to Docker Hub
uses: https://github.com/docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: Build and push
uses: https://github.com/docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.tags.outputs.tags }}
file: ./1.7/Dockerfile.prod