Add continuous builds
This commit is contained in:
parent
ad87105836
commit
ffe6402166
|
@ -0,0 +1,69 @@
|
|||
---
|
||||
name: Continuously build images
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "30 0 * * 0"
|
||||
|
||||
jobs:
|
||||
run_image_update_builds:
|
||||
strategy:
|
||||
matrix:
|
||||
version:
|
||||
- major: 8
|
||||
full: "8.6"
|
||||
- major: 9
|
||||
full: "9.0"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to Quay
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: quay.io
|
||||
username: ${{ secrets.QUAYIO_USERNAME }}
|
||||
password: ${{ secrets.QUAYIO_TOKEN }}
|
||||
|
||||
- name: Build and push not latest version
|
||||
if: matrix.version.major != 9
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
file: Dockerfile-update
|
||||
platforms: linux/amd64,linux/arm64/v8
|
||||
push: true
|
||||
tags: |
|
||||
rockylinux/rockylinux:${{ matrix.version.major }}
|
||||
quay.io/rockylinux/rockylinux:${{ matrix.version.major }}
|
||||
build-args: |
|
||||
Imageversion=${{ matrix.version.full }}
|
||||
|
||||
- name: Build and push latest version
|
||||
if: matrix.version.major == 9
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
file: Dockerfile-update
|
||||
platforms: linux/amd64,linux/arm64/v8
|
||||
push: true
|
||||
tags: |
|
||||
rockylinux/rockylinux:${{ matrix.version.major }}
|
||||
rockylinux/rockylinux:latest
|
||||
quay.io/rockylinux/rockylinux:${{ matrix.version.major }}
|
||||
quay.io/rockylinux/rockylinux:latest
|
||||
build-args: |
|
||||
Imageversion=${{ matrix.version.full }}
|
|
@ -0,0 +1,7 @@
|
|||
ARG Imageversion
|
||||
|
||||
FROM rockylinux:$Imageversion
|
||||
|
||||
RUN dnf -y update
|
||||
|
||||
RUN dnf clean all
|
Loading…
Reference in New Issue