-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.51 KB
/
ci.yaml
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
concurrency:
group: ci-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches:
- master
tags:
- "*"
pull_request:
schedule:
- cron: "0 10 * * *" # ~2am PST
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: false
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Just
uses: extractions/setup-just@v2
- name: Setup Oras
uses: oras-project/setup-oras@v1
with:
version: 1.2.0
- name: Build
run: |
just --timestamp build
- name: Login to ghcr.io
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish on a tag push
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
run: |
just --timestamp push
- name: Setup tmate session for debug
if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 30
with:
limit-access-to-actor: true