-
Notifications
You must be signed in to change notification settings - Fork 42
62 lines (58 loc) · 1.66 KB
/
ci.yml
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
62
---
name: CI
on:
pull_request:
paths-ignore:
- '**.md'
push:
branches:
- master
paths-ignore:
- '**.md'
schedule:
- cron: 0 0 * * *
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.data.outputs.versions }}
contexts: ${{ steps.data.outputs.contexts }}
excludes: ${{ steps.data.outputs.excludes }}
steps:
- name: Checkout
uses: actions/checkout@main
- uses: ruby/setup-ruby@master
- name: Setup variables
id: data
run: |
echo "versions=$(bin/images --json | jq -c '.github.versions')" >> $GITHUB_OUTPUT
echo "contexts=$(bin/images --json | jq -c '.github.contexts')" >> $GITHUB_OUTPUT
echo "excludes=$(bin/images --json | jq -c '.github.excludes')" >> $GITHUB_OUTPUT
build:
needs: matrix
strategy:
fail-fast: false
matrix:
version: ${{ fromJson(needs.matrix.outputs.versions) }}
context: ${{ fromJson(needs.matrix.outputs.contexts) }}
exclude: ${{ fromJson(needs.matrix.outputs.excludes) }}
uses: ./.github/workflows/build.yml
with:
version: ${{ matrix.version }}
context: ${{ matrix.context }}
secrets: inherit
clean:
needs: build
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Clean emacs untagged images
uses: dataaxiom/ghcr-cleanup-action@main
with:
package: emacs
token: ${{ secrets.GITHUB_TOKEN }}
- name: Clean emacs-cache untagged images
uses: dataaxiom/ghcr-cleanup-action@main
with:
package: emacs-cache
token: ${{ secrets.GITHUB_TOKEN }}