summaryrefslogtreecommitdiff
path: root/.github/workflows/docker.yml
blob: 6e1e856574399924a7ad3b27370385b975395c07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Rebuild Docker CI images

on:
  workflow_dispatch:
  schedule:
    - cron: "23 5 * * *"  # daily at 5:23

jobs:
  docker:
    if: "github.repository == 'qutebrowser/qutebrowser'"
    runs-on: ubuntu-20.04
    strategy:
      matrix:
        image:
          - archlinux-webkit
          - archlinux-webengine
          - archlinux-webengine-unstable
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: '3.x'
      - run: pip install jinja2
      - name: Generate Dockerfile
        run: python3 generate.py ${{ matrix.image }}
        working-directory: scripts/dev/ci/docker/
      - uses: docker/setup-buildx-action@v1
      - uses: docker/login-action@v1
        with:
          username: qutebrowser
          password: ${{ secrets.DOCKER_TOKEN }}
      - uses: docker/build-push-action@v2
        with:
          file: scripts/dev/ci/docker/Dockerfile
          context: .
          tags: "qutebrowser/ci:${{ matrix.image }}"
          push: ${{ github.ref == 'refs/heads/master' }}

  irc:
    timeout-minutes: 2
    continue-on-error: true
    runs-on: ubuntu-20.04
    needs: [docker]
    if: "always() && github.repository == 'qutebrowser/qutebrowser'"
    steps:
      - name: Send success IRC notification
        uses: Gottox/irc-message-action@v1
        if: "needs.docker.result == 'success'"
        with:
          server: irc.libera.chat
          channel: '#qutebrowser-dev'
          nickname: qutebrowser-bot
          message: "[${{ github.workflow }}] \u00033Success:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})"
      - name: Send non-success IRC notification
        uses: Gottox/irc-message-action@v1
        if: "needs.docker.result != 'success'"
        with:
          server: irc.libera.chat
          channel: '#qutebrowser-dev'
          nickname: qutebrowser-bot
          message: "[${{ github.workflow }}] \u00034FAIL:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})"