summaryrefslogtreecommitdiff
path: root/.github/workflows/docker.yml
blob: e67cff8f96ea331f519494aa990e8bb38c5e0bfe (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
name: Rebuild Docker CI images

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

defaults:
  run:
    working-directory: scripts/dev/ci/docker/

jobs:
  docker:
    runs-on: ubuntu-latest
    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 }}
      - 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:
          context: .
          tags: "qutebrowser/ci:${{ matrix.image }}"
          push: ${{ github.ref == 'refs/heads/master' }}

  irc:
    runs-on: ubuntu-latest
    needs: [docker]
    if: "always() && github.repository_owner == 'qutebrowser'"
    steps:
    - name: Send success IRC notification
      uses: Gottox/irc-message-action@v1.1
      if: "needs.docker.result == 'success'"
      with:
        server: chat.freenode.net
        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.1
      if: "needs.docker.result != 'success'"
      with:
        server: chat.freenode.net
        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 }})"