-
Notifications
You must be signed in to change notification settings - Fork 8
49 lines (45 loc) · 1.45 KB
/
build_latest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: "build-latest"
on:
push:
branches:
- "main"
- "master"
paths:
- "Dockerfile*"
- ".github/workflows/**"
pull_request:
branches:
- "main"
- "master"
paths:
- "Dockerfile*"
jobs:
docker_buildx_alpine:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository and set up Docker
uses: JonasAlfredsson/[email protected]
with:
should_login: ${{ github.event_name != 'pull_request' }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract the Nginx version numbers from the Dockerfile
id: tagger
run: bash .github/version_extractor.sh ./Dockerfile >> $GITHUB_ENV
- name: Build and push latest Alpine image with all tags
uses: docker/[email protected]
with:
context: ./
file: ./Dockerfile
platforms: |
linux/amd64
linux/arm64
linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: |
axistools/nginx-ldap:alpine
axistools/nginx-ldap:mainline-alpine
axistools/nginx-ldap:${{ env.NGINX_MAJOR }}-alpine
axistools/nginx-ldap:${{ env.NGINX_MAJOR }}.${{ env.NGINX_MINOR }}-alpine
axistools/nginx-ldap:${{ env.NGINX_MAJOR }}.${{ env.NGINX_MINOR }}.${{ env.NGINX_PATCH }}-alpine