Skip to content

Commit

Permalink
Update container release workflows for Debian 11 and 12
Browse files Browse the repository at this point in the history
  • Loading branch information
hspaans authored Dec 27, 2023
1 parent 07186b1 commit c50280d
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 120 deletions.
119 changes: 59 additions & 60 deletions .github/workflows/container-release-debian-11.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,60 @@
---
name: Container Release (Debian 11)

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

jobs:
build-test:
name: Container Test Build
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Run tests
run: docker build . --file Dockerfile.debian-11

build-release:
name: Container Release
runs-on: ubuntu-latest
needs: build-test
if: github.ref == 'refs/heads/master' && github.event_name == 'push'

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: Dockerfile.debian-11
tags: ghcr.io/hspaans/molecule-containers:debian-11

name: Container Release (Debian 11)

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

jobs:
build-test:
name: Container Test Build
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Run tests
run: docker build . --file Dockerfile.debian-11

build-release:
name: Container Release
runs-on: ubuntu-latest
needs: build-test
if: github.ref == 'refs/heads/master' && github.event_name == 'push'

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: Dockerfile.debian-11
tags: ghcr.io/hspaans/molecule-containers:debian-11
119 changes: 59 additions & 60 deletions .github/workflows/container-release-debian-12.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,60 @@
---
name: Container Release (Debian 12)

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

jobs:
build-test:
name: Container Test Build
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Run tests
run: docker build . --file Dockerfile.debian-12

build-release:
name: Container Release
runs-on: ubuntu-latest
needs: build-test
if: github.ref == 'refs/heads/master' && github.event_name == 'push'

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: Dockerfile.debian-12
tags: ghcr.io/hspaans/molecule-containers:debian-12

name: Container Release (Debian 12)

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

jobs:
build-test:
name: Container Test Build
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Run tests
run: docker build . --file Dockerfile.debian-12

build-release:
name: Container Release
runs-on: ubuntu-latest
needs: build-test
if: github.ref == 'refs/heads/master' && github.event_name == 'push'

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: Dockerfile.debian-12
tags: ghcr.io/hspaans/molecule-containers:debian-12

0 comments on commit c50280d

Please sign in to comment.