CI #1168
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 }} |