Skip to content

Build Docker Images #977

Build Docker Images

Build Docker Images #977

Workflow file for this run

name: Build Docker Images
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
images:
runs-on: ubuntu-latest
steps:
- name: checkout sources
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
id: buildx
with:
install: true
- name: Docker rt meta
id: meta
uses: docker/metadata-action@v5
with:
images: firefart/requesttracker
tags: |
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}
# set rt version
type=raw,value=5.0.5,enable=true
# make a sha tag
type=sha,enable=true,priority=100,prefix=sha-,suffix=,format=short
type=schedule,pattern={{date 'YYYYMMDD'}},prefix=nightly-
# add a nginx prefix for the nginx images
- name: Docker nginx meta
id: meta_nginx
uses: docker/metadata-action@v5
with:
images: firefart/requesttracker
tags: |
# set latest tag for default branch
type=raw,value=nginx-latest,enable={{is_default_branch}}
# make a sha tag
type=sha,enable=true,priority=100,prefix=nginx-sha-,suffix=,format=short
type=schedule,pattern={{date 'YYYYMMDD'}},prefix=nginx-nightly-
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push RT
uses: docker/build-push-action@v5
with:
push: true
#platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push NGINX
uses: docker/build-push-action@v5
with:
context: ./nginx/
push: true
#platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: ${{ steps.meta_nginx.outputs.tags }}
labels: ${{ steps.meta_nginx.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max