diff --git a/.github/workflows/continuous-build.yml b/.github/workflows/continuous-build.yml new file mode 100644 index 0000000..94bf768 --- /dev/null +++ b/.github/workflows/continuous-build.yml @@ -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 }} diff --git a/Dockerfile-update b/Dockerfile-update new file mode 100644 index 0000000..b4ac8e8 --- /dev/null +++ b/Dockerfile-update @@ -0,0 +1,7 @@ +ARG Imageversion + +FROM rockylinux:$Imageversion + +RUN dnf -y update + +RUN dnf clean all \ No newline at end of file