diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/.github/workflows/images.yml | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/.github/workflows/images.yml')
-rw-r--r-- | meson/.github/workflows/images.yml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meson/.github/workflows/images.yml b/meson/.github/workflows/images.yml new file mode 100644 index 000000000..9c11f4d2d --- /dev/null +++ b/meson/.github/workflows/images.yml @@ -0,0 +1,62 @@ +name: CI image builder + +concurrency: + group: img_builder-${{ github.head_ref }} + cancel-in-progress: true + +on: + push: + branches: + - master + paths: + - 'ci/ciimage/**' + - '.github/workflows/images.yml' + + pull_request: + branches: + - master + paths: + - 'ci/ciimage/**' + - '.github/workflows/images.yml' + + # Rebuild the images every week (Sunday) + schedule: + - cron: '0 0 * * 0' + +jobs: + build: + env: + HAS_DOCKER_CREDENTIALS: ${{ secrets.DOCKER_PASSWORD != '' }} + name: ${{ matrix.cfg.name }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + cfg: + - { name: Arch Linux, id: arch } + - { name: CUDA (on Arch), id: cuda } + - { name: Fedora, id: fedora } + - { name: OpenSUSE, id: opensuse } + - { name: Ubuntu Bionic, id: bionic } + - { name: Ubuntu Rolling, id: ubuntu-rolling } + steps: + - uses: actions/checkout@v2 + + # Login to dockerhub + - name: Docker login + if: (github.event_name == 'push' || github.event_name == 'schedule') && env.HAS_DOCKER_CREDENTIALS == 'true' + uses: azure/docker-login@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + # Build and test + - name: Building the ${{ matrix.cfg.id }} image + run: ./ci/ciimage/build.py -t build ${{ matrix.cfg.id }} + - name: Testing the ${{ matrix.cfg.id }} image + run: ./ci/ciimage/build.py -t test ${{ matrix.cfg.id }} + + # Publish + - name: Push the ${{ matrix.cfg.id }} image + run: docker push mesonbuild/${{ matrix.cfg.id }} + if: (github.event_name == 'push' || github.event_name == 'schedule') && env.HAS_DOCKER_CREDENTIALS == 'true' |