Skip to content

Commit 7ae36a4

Browse files
committed
Second pass at implementing GitHub actions
1 parent f0cf74d commit 7ae36a4

File tree

5 files changed

+244
-33
lines changed

5 files changed

+244
-33
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
name: Alpine Mainline
3+
"on":
4+
workflow_dispatch:
5+
jobs:
6+
core:
7+
name: Build Alpine NGINX mainline Docker image
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- name: Check out the codebase
11+
uses: actions/checkout@v3
12+
- name: Set up QEMU
13+
uses: docker/setup-qemu-action@v1
14+
- name: Set up Docker Buildx
15+
uses: docker/setup-buildx-action@v1
16+
- name: Login to Docker Hub
17+
uses: docker/login-action@v1
18+
with:
19+
username: ${{ secrets.DOCKERHUB_USERNAME }}
20+
password: ${{ secrets.DOCKERHUB_TOKEN }}
21+
- name: Parse NGINX mainline version
22+
id: version
23+
run: |
24+
echo "::set-output name=major::$(cat mainline/alpine/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $1 }')"
25+
echo "::set-output name=minor::$(cat mainline/alpine/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $2 }')"
26+
echo "::set-output name=patch::$(cat mainline/alpine/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $3 }')"
27+
- name: Build and push NGINX mainline Alpine image
28+
uses: docker/build-push-action@v2
29+
with:
30+
platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64, linux/386, linux/ppc64le, linux/s390x
31+
context: "{{ defaultContext }}:mainline/alpine"
32+
tags: nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }}-alpine, nginxinc/nginx-unprivileged:mainline-alpine, nginxinc/nginx-unprivileged:1-alpine, nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}-alpine, nginxinc/nginx-unprivileged:alpine
33+
push: false
34+
perl:
35+
name: Build Alpine NGINX perl mainline Docker image
36+
runs-on: ubuntu-20.04
37+
steps:
38+
- name: Check out the codebase
39+
uses: actions/checkout@v3
40+
- name: Set up QEMU
41+
uses: docker/setup-qemu-action@v1
42+
- name: Set up Docker Buildx
43+
uses: docker/setup-buildx-action@v1
44+
- name: Login to Docker Hub
45+
uses: docker/login-action@v1
46+
with:
47+
username: ${{ secrets.DOCKERHUB_USERNAME }}
48+
password: ${{ secrets.DOCKERHUB_TOKEN }}
49+
- name: Parse NGINX mainline version
50+
id: version
51+
run: |
52+
echo "::set-output name=major::$(cat mainline/alpine-perl/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $1 }')"
53+
echo "::set-output name=minor::$(cat mainline/alpine-perl/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $2 }')"
54+
echo "::set-output name=patch::$(cat mainline/alpine-perl/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $3 }')"
55+
- name: Build and push NGINX mainline perl Alpine image
56+
uses: docker/build-push-action@v2
57+
with:
58+
platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64, linux/386, linux/ppc64le, linux/s390x
59+
context: "{{ defaultContext }}:mainline/alpine-perl"
60+
tags: nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }}-alpine-perl, nginxinc/nginx-unprivileged:mainline-alpine-perl, nginxinc/nginx-unprivileged:1-alpine-perl, nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}-alpine-perl, nginxinc/nginx-unprivileged:alpine-perl
61+
push: false
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
name: Alpine Stable
3+
"on":
4+
workflow_dispatch:
5+
jobs:
6+
core:
7+
name: Build Alpine NGINX stable Docker image
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- name: Check out the codebase
11+
uses: actions/checkout@v3
12+
- name: Set up QEMU
13+
uses: docker/setup-qemu-action@v1
14+
- name: Set up Docker Buildx
15+
uses: docker/setup-buildx-action@v1
16+
- name: Login to Docker Hub
17+
uses: docker/login-action@v1
18+
with:
19+
username: ${{ secrets.DOCKERHUB_USERNAME }}
20+
password: ${{ secrets.DOCKERHUB_TOKEN }}
21+
- name: Parse NGINX stable version
22+
id: version
23+
run: |
24+
echo "::set-output name=major::$(cat stable/alpine/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $1 }')"
25+
echo "::set-output name=minor::$(cat stable/alpine/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $2 }')"
26+
echo "::set-output name=patch::$(cat stable/alpine/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $3 }')"
27+
- name: Build and push NGINX stable Alpine image
28+
uses: docker/build-push-action@v2
29+
with:
30+
platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64, linux/386, linux/ppc64le, linux/s390x
31+
context: "{{ defaultContext }}:stable/alpine"
32+
tags: nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }}-alpine, nginxinc/nginx-unprivileged:stable-alpine, nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}-alpine
33+
push: false
34+
perl:
35+
name: Build Alpine NGINX perl stable Docker image
36+
runs-on: ubuntu-20.04
37+
steps:
38+
- name: Check out the codebase
39+
uses: actions/checkout@v3
40+
- name: Set up QEMU
41+
uses: docker/setup-qemu-action@v1
42+
- name: Set up Docker Buildx
43+
uses: docker/setup-buildx-action@v1
44+
- name: Login to Docker Hub
45+
uses: docker/login-action@v1
46+
with:
47+
username: ${{ secrets.DOCKERHUB_USERNAME }}
48+
password: ${{ secrets.DOCKERHUB_TOKEN }}
49+
- name: Parse NGINX stable version
50+
id: version
51+
run: |
52+
echo "::set-output name=major::$(cat stable/alpine-perl/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $1 }')"
53+
echo "::set-output name=minor::$(cat stable/alpine-perl/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $2 }')"
54+
echo "::set-output name=patch::$(cat stable/alpine-perl/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $3 }')"
55+
- name: Build and push NGINX stable perl Alpine image
56+
uses: docker/build-push-action@v2
57+
with:
58+
platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64, linux/386, linux/ppc64le, linux/s390x
59+
context: "{{ defaultContext }}:stable/alpine-perl"
60+
tags: nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }}-alpine-perl, nginxinc/nginx-unprivileged:stable-alpine-perl, nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}-alpine-perl
61+
push: false

.github/workflows/build.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
name: Debian Mainline
3+
"on":
4+
workflow_dispatch:
5+
jobs:
6+
core:
7+
name: Build Debian NGINX mainline Docker image
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- name: Check out the codebase
11+
uses: actions/checkout@v3
12+
- name: Set up QEMU
13+
uses: docker/setup-qemu-action@v1
14+
- name: Set up Docker Buildx
15+
uses: docker/setup-buildx-action@v1
16+
- name: Login to Docker Hub
17+
uses: docker/login-action@v1
18+
with:
19+
username: ${{ secrets.DOCKERHUB_USERNAME }}
20+
password: ${{ secrets.DOCKERHUB_TOKEN }}
21+
- name: Parse NGINX mainline version
22+
id: version
23+
run: |
24+
echo "::set-output name=major::$(cat mainline/debian/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $1 }')"
25+
echo "::set-output name=minor::$(cat mainline/debian/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $2 }')"
26+
echo "::set-output name=patch::$(cat mainline/debian/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $3 }')"
27+
- name: Build and push NGINX mainline Debian image
28+
uses: docker/build-push-action@v2
29+
with:
30+
platforms: linux/amd64, linux/arm/v5, linux/arm/v7, linux/arm64, linux/mips64le, linux/ppc64le, linux/s390x
31+
context: "{{ defaultContext }}:mainline/debian"
32+
tags: nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }}, nginxinc/nginx-unprivileged:mainline, nginxinc/nginx-unprivileged:1, nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}, nginxinc/nginx-unprivileged:latest
33+
push: false
34+
perl:
35+
name: Build Debian perl NGINX mainline Docker image
36+
runs-on: ubuntu-20.04
37+
steps:
38+
- name: Check out the codebase
39+
uses: actions/checkout@v3
40+
- name: Set up QEMU
41+
uses: docker/setup-qemu-action@v1
42+
- name: Set up Docker Buildx
43+
uses: docker/setup-buildx-action@v1
44+
- name: Login to Docker Hub
45+
uses: docker/login-action@v1
46+
with:
47+
username: ${{ secrets.DOCKERHUB_USERNAME }}
48+
password: ${{ secrets.DOCKERHUB_TOKEN }}
49+
- name: Parse NGINX mainline version
50+
id: version
51+
run: |
52+
echo "::set-output name=major::$(cat mainline/debian-perl/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $1 }')"
53+
echo "::set-output name=minor::$(cat mainline/debian-perl/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $2 }')"
54+
echo "::set-output name=patch::$(cat mainline/debian-perl/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $3 }')"
55+
- name: Build and push NGINX mainline perl Debian image
56+
uses: docker/build-push-action@v2
57+
with:
58+
platforms: linux/amd64, linux/arm/v5, linux/arm/v7, linux/arm64, linux/mips64le, linux/ppc64le, linux/s390x
59+
context: "{{ defaultContext }}:mainline/debian-perl"
60+
tags: nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }}-perl, nginxinc/nginx-unprivileged:mainline-perl, nginxinc/nginx-unprivileged:1-perl, nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}-perl, nginxinc/nginx-unprivileged:perl
61+
push: false
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
name: Debian Stable
3+
"on":
4+
workflow_dispatch:
5+
jobs:
6+
core:
7+
name: Build Debian NGINX stable Docker image
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- name: Check out the codebase
11+
uses: actions/checkout@v3
12+
- name: Set up QEMU
13+
uses: docker/setup-qemu-action@v1
14+
- name: Set up Docker Buildx
15+
uses: docker/setup-buildx-action@v1
16+
- name: Login to Docker Hub
17+
uses: docker/login-action@v1
18+
with:
19+
username: ${{ secrets.DOCKERHUB_USERNAME }}
20+
password: ${{ secrets.DOCKERHUB_TOKEN }}
21+
- name: Parse NGINX stable version
22+
id: version
23+
run: |
24+
echo "::set-output name=major::$(cat stable/debian/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $1 }')"
25+
echo "::set-output name=minor::$(cat stable/debian/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $2 }')"
26+
echo "::set-output name=patch::$(cat stable/debian/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $3 }')"
27+
- name: Build and push NGINX stable Debian image
28+
uses: docker/build-push-action@v2
29+
with:
30+
platforms: linux/amd64, linux/arm/v5, linux/arm/v7, linux/arm64, linux/mips64le, linux/ppc64le, linux/s390x
31+
context: "{{ defaultContext }}:stable/debian"
32+
tags: nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }}, nginxinc/nginx-unprivileged:stable, nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}
33+
push: false
34+
perl:
35+
name: Build Debian perl NGINX stable Docker image
36+
runs-on: ubuntu-20.04
37+
steps:
38+
- name: Check out the codebase
39+
uses: actions/checkout@v3
40+
- name: Set up QEMU
41+
uses: docker/setup-qemu-action@v1
42+
- name: Set up Docker Buildx
43+
uses: docker/setup-buildx-action@v1
44+
- name: Login to Docker Hub
45+
uses: docker/login-action@v1
46+
with:
47+
username: ${{ secrets.DOCKERHUB_USERNAME }}
48+
password: ${{ secrets.DOCKERHUB_TOKEN }}
49+
- name: Parse NGINX stable version
50+
id: version
51+
run: |
52+
echo "::set-output name=major::$(cat stable/debian-perl/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $1 }')"
53+
echo "::set-output name=minor::$(cat stable/debian-perl/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $2 }')"
54+
echo "::set-output name=patch::$(cat stable/debian-perl/Dockerfile | awk '$1 == "ENV" && $2 == "NGINX_VERSION" { print $3 }' | awk -F. '{ print $3 }')"
55+
- name: Build and push NGINX stable perl Debian image
56+
uses: docker/build-push-action@v2
57+
with:
58+
platforms: linux/amd64, linux/arm/v5, linux/arm/v7, linux/arm64, linux/mips64le, linux/ppc64le, linux/s390x
59+
context: "{{ defaultContext }}:mainline/debian-perl"
60+
tags: nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }}-perl, nginxinc/nginx-unprivileged:stable-perl, nginxinc/nginx-unprivileged:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}-perl
61+
push: false

0 commit comments

Comments
 (0)