Skip to content

Commit

Permalink
Update Dockerfile paths and add recursive flag for hadolint
Browse files Browse the repository at this point in the history
  • Loading branch information
hspaans authored Dec 26, 2023
1 parent c0a10a4 commit 14eb658
Show file tree
Hide file tree
Showing 13 changed files with 218 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/container-release-debian-10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Container Release (Debian 10)

on:
push:
branches:
- master
paths:
- "debian-10/Dockerfile"
- ".github/workflows/container-release-debian-10.yml"
workflow_dispatch:

jobs:
build-release:
name: Build and Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Packages Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
file: debian-10/Dockerfile
tags: ghcr.io/hspaans/molecule-containers:debian-10
43 changes: 43 additions & 0 deletions .github/workflows/container-release-debian-11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Container Release (Debian 11)

on:
push:
branches:
- master
paths:
- "debian-11/Dockerfile"
- ".github/workflows/container-release-debian-11.yml"
workflow_dispatch:

jobs:
build-release:
name: Build and Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Packages Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
file: debian-11/Dockerfile
tags: ghcr.io/hspaans/molecule-containers:debian-11
43 changes: 43 additions & 0 deletions .github/workflows/container-release-debian-12.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Container Release (Debian 12)

on:
push:
branches:
- master
paths:
- "debian-12/Dockerfile"
- ".github/workflows/container-release-debian-12.yml"
workflow_dispatch:

jobs:
build-release:
name: Build and Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Packages Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
file: debian-12/Dockerfile
tags: ghcr.io/hspaans/molecule-containers:debian-12
43 changes: 43 additions & 0 deletions .github/workflows/container-release-ubuntu-2004.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Container Release (Ubuntu 20.04)

on:
push:
branches:
- master
paths:
- "ubuntu-20.04/Dockerfile"
- ".github/workflows/container-release-ubuntu-2004.yml"
workflow_dispatch:

jobs:
build-release:
name: Build and Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Packages Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
file: ubuntu-20.04/Dockerfile
tags: ghcr.io/hspaans/molecule-containers:ubuntu-20.04
43 changes: 43 additions & 0 deletions .github/workflows/container-release-ubuntu-2204.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Container Release (Ubuntu 22.04)

on:
push:
branches:
- master
paths:
- "ubuntu-22.04/Dockerfile"
- ".github/workflows/container-release-ubuntu-2204.yml"
workflow_dispatch:

jobs:
build-release:
name: Build and Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Packages Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
file: ubuntu-22.04/Dockerfile
tags: ghcr.io/hspaans/molecule-containers:ubuntu-22.04
4 changes: 2 additions & 2 deletions .github/workflows/container-release-ubuntu-2404.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches:
- master
paths:
- "Dockerfile.ubuntu-24.04"
- "ubuntu-24.04/Dockerfile"
- ".github/workflows/container-release-ubuntu-2404.yml"
workflow_dispatch:

Expand Down Expand Up @@ -39,5 +39,5 @@ jobs:
with:
platforms: linux/amd64,linux/arm64
push: true
file: Dockerfile.ubuntu-24.04
file: ubuntu-24.04/Dockerfile
tags: ghcr.io/hspaans/molecule-containers:ubuntu-24.04
1 change: 1 addition & 0 deletions .github/workflows/hadolint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf
with:
dockerfile: ./Dockerfile
recursive: true
format: sarif
output-file: hadolint-results.sarif
no-fail: true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 14eb658

Please sign in to comment.