docker-getgrav/.forgejo/workflows/test.yml
Magnus Walbeck 7bb72216f3
Some checks failed
Test / lint (pull_request) Failing after 4s
Test / grav1_7 (pull_request) Failing after 1m11s
Test / grav1_7_prod (pull_request) Failing after 1m13s
Switch qemu image
2025-02-15 00:24:29 +01:00

78 lines
No EOL
2.2 KiB
YAML

name: Test
on: pull_request
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/composer"
run: |
determine-docker-tags
dockerd &
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v7.0.0-28
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: Test build
uses: https://github.com/docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
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/composer"
run: |
determine-docker-tags
dockerd &
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v7.0.0-28
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: Test build
uses: https://github.com/docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
tags: ${{ steps.tags.outputs.tags }}
file: ./1.7/Dockerfile.prod