|
| 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 |
0 commit comments