Files
homebrew-emacs-builds/.github/workflows/update-casks.yml
Workflow config file is invalid. Please check your config file: yaml: unmarshal errors: line 3: cannot unmarshal !!str `jimeh/h...` into model.RawConcurrency
Jim Myhrberg 3ef419b3f0 fix(meta): update meta along with casks
It turns out push events are not triggered when commits are created by
github actions via the GitHub API. So let's simplify things and just
update the meta branch in the same workflow that updates the casks
themselves.
2021-07-05 03:40:48 +01:00

99 lines
3.1 KiB
YAML

---
name: Update Casks
concurrency: jimeh/homebrew-emacs-builds/update-casks
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
inputs:
extraArgs:
description: "Extra arguments passed to emacs-builder cask update"
required: false
default: ""
jobs:
update-casks:
runs-on: macos-10.15
steps:
- name: Checkout tap repository
uses: actions/checkout@v2
with:
path: tap
- name: Symlink homebrew tap
run: |
mkdir -p "$(brew --repo)/Library/Taps/jimeh"
ln -s "${{ github.workspace }}/tap" \
"$(brew --repo)/Library/Taps/jimeh/homebrew-emacs-builds"
- name: brew livecheck
run: >-
brew livecheck --json --quiet --tap jimeh/emacs-builds
| tee livecheck-results.json
- name: Upload livecheck-results.json artifact
uses: actions/upload-artifact@v2
with:
name: livecheck-results.json
path: livecheck-results.json
if-no-files-found: error
- name: Checkout build-emacs-for-macos for emacs-builder tool
uses: actions/checkout@v2
with:
repository: jimeh/build-emacs-for-macos
ref: "v0.6.9"
path: builder
- uses: actions/setup-go@v2
with:
go-version: 1.16
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('builder/**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Build emacs-builder tool
run: make build
working-directory: builder
- name: Update casks
run: >-
builder/bin/emacs-builder
cask --builds-repository jimeh/emacs-builds
update --templates-dir tap/templates
${{ github.event.inputs.extraArgs }}
livecheck-results.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update-meta:
runs-on: macos-10.15
needs: [update-casks]
steps:
- name: Checkout tap repository main branch
uses: actions/checkout@v2
with:
path: tap
- name: Symlink homebrew tap
run: |
mkdir -p "$(brew --repo)/Library/Taps/jimeh"
ln -s "${{ github.workspace }}/tap" \
"$(brew --repo)/Library/Taps/jimeh/homebrew-emacs-builds"
- name: Checkout tap repository meta branch
uses: actions/checkout@v2
with:
ref: meta
path: meta
- name: Install meta dependencies
run: brew bundle
working-directory: meta
- name: Update meta files
run: make update
working-directory: meta
- name: commit and push changes to meta branch
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore(meta): update meta files"
repository: meta
branch: meta
commit_user_name: github-actions[bot]
commit_user_email: github-actions[bot]@users.noreply.github.com
commit_author: >-
github-actions[bot] <github-actions[bot]@users.noreply.github.com>
skip_dirty_check: false