diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..900b7e1 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,47 @@ +# +# Copyright: 2022, The Geany contributors +# License: GNU GPL v2 or later + +name: Build CI Docker Images + +on: + push: + workflow_dispatch: +# schedule: +# # Run weekly on Friday +# - cron: '34 5 * * FRI' + +# cancel already running builds of the same branch or pull request +concurrency: + group: ci-${{ github.head_ref }} || concat(${{ github.ref }} + cancel-in-progress: true + +jobs: + mingw64: + name: Build Docker image for mingw664 CI builds + runs-on: ubuntu-22.04 + permissions: + packages: write + + env: + DOCKER_REGISTRY: "ghcr.io" + DOCKER_IMAGE_NAME: "geany-mingw64-ci" + DOCKER_IMAGE_TAG: "ghcr.io/geany/geany-mingw64-ci:latest" + + steps: + - name: Checkout Build Scripts + uses: actions/checkout@v3 + + - name: Log In To The Container Registry + uses: docker/login-action@v2 + with: + registry: ${{ env.DOCKER_REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build And Push Docker Image + run: | + cd builders + bash start_build.sh --log-to-stdout --mingw64 --rebuild-images + docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ env.DOCKER_IMAGE_TAG }} + docker push ${{ env.DOCKER_IMAGE_TAG }} diff --git a/builders/README.md b/builders/README.md index e4c9425..535cbd6 100644 --- a/builders/README.md +++ b/builders/README.md @@ -125,6 +125,10 @@ The Docker image for the Windows build is based on a Debian image but has the fu for cross-compiling to mingw64 included. Additionally, the image contains a self-compiled Pacman package manager to install packages from the MSYS2 repositories. +A Github Action workflow is configured in this repository to build and push the image +to the Github Docker image registry as ghcr.io/geany/geany-mingw64-ci:latest. The workflow +is triggered once a week automatically. + ### Code sign certificate If the directory `certificates` contains the two files `cert.pem` and `key.pem`,