diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-03-25 14:46:46 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-04-02 09:47:06 +0200 |
commit | 3b1353ce819fece543252458f8409f7eb65ff3ae (patch) | |
tree | 17c2183d3c0aca5cbb1b632ec1fd69a6652f4d45 /.github | |
parent | 0d3d069a7fe84b369c41ac3b1c3fb539f7cb3fce (diff) | |
download | meson-3b1353ce819fece543252458f8409f7eb65ff3ae.zip meson-3b1353ce819fece543252458f8409f7eb65ff3ae.tar.gz meson-3b1353ce819fece543252458f8409f7eb65ff3ae.tar.bz2 |
ci: Automatically build and publish images
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/images.yml | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml new file mode 100644 index 0000000..efe5d93 --- /dev/null +++ b/.github/workflows/images.yml @@ -0,0 +1,54 @@ +name: CI image builder + +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: + name: ${{ matrix.cfg.name }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + cfg: + - { name: Arch Linux, id: arch } + - { name: Fedora, id: fedora } + - { name: OpenSUSE, id: opensuse } + - { name: Ubuntu Eoan, id: eoan } + steps: + - uses: actions/checkout@v2 + + # Login to dockerhub + - name: Docker login + if: github.event_name == 'push' || github.event_name == 'schedule' + 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 + if: github.event_name == 'push' || github.event_name == 'schedule' + run: docker push mesonbuild/${{ matrix.cfg.id }} |