Skip to content

Cache rq binary

Cache rq binary #1649

Workflow file for this run

name: Build
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build-matrix:
env:
RQ_VERSION: v0.0.9
name: Matrix
strategy:
matrix:
os:
- runner: ubuntu-latest
name: linux
static: true
- runner: macos-13
name: macos-intel
static: false
- runner: macos-14
name: macos-arm64
static: true
runs-on: ${{ matrix.os.runner }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: open-policy-agent/setup-opa@v2
with:
version: edge
static: ${{ matrix.os.static }}
- run: npm install -g markdownlint-cli
- name: Restore rq cache
id: cache-rq
uses: actions/cache@v4
with:
path: ~/go/bin/rq
key: ${{ runner.os }}-${{ runner.arch }}-go-rq-${{ env.RQ_VERSION }}
- run: go install git.sr.ht/~charles/rq/cmd/rq@${{ env.RQ_VERSION }}
if: steps.cache-rq.outputs.cache-hit != 'true'
- name: Cache rq binary
if: steps.cache-rq.outputs.cache-hit != 'true'
uses: actions/cache@v4
with:
path: ~/go/bin/rq
key: ${{ runner.os }}-${{ runner.arch }}-go-rq-${{ env.RQ_VERSION }}
- run: build/do.rq pull_request
- uses: golangci/golangci-lint-action@v6.0.1
if: matrix.os.name == 'linux'
with:
version: v1.59.0
- uses: actions/upload-artifact@v4
with:
name: regal-${{ matrix.os.name }}
path: regal