-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.yaml
More file actions
141 lines (115 loc) · 3.97 KB
/
example.yaml
File metadata and controls
141 lines (115 loc) · 3.97 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: CI
on:
push:
tags:
- "*"
branches:
- main
pull_request:
branches:
- main
jobs:
# Run tests, linting, and static analysis
# Option 1: Use .tool-versions from your project (simplest)
# test:
# uses: intility/reusable-elixir/.github/workflows/elixir-test.yaml@8538d07c58d0c44e844e68a773ec729f21ee4ed7 # v2.2.1
# Option 2: Matrix strategy for testing multiple Elixir/OTP versions
test:
strategy:
fail-fast: false
matrix:
include:
# Elixir 1.18 supports OTP 25-27
- elixir: "1.18"
otp: "27"
# Elixir 1.19 supports OTP 27-28
- elixir: "1.19"
otp: "27"
- elixir: "1.19"
otp: "28"
uses: intility/reusable-elixir/.github/workflows/elixir-test.yaml@8538d07c58d0c44e844e68a773ec729f21ee4ed7 # v2.2.1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
# Set directory if Elixir app is in a subdirectory
# directory: apps/my-elixir-app
# Static analysis defaults:
# - audit: true (hex.audit and deps.audit)
# - credo: true
# - dialyzer: false (enable if needed, slow)
# - sobelow: false (enable for Phoenix projects)
dialyzer: true
# sobelow: true
# Database support (starts PostgreSQL service automatically)
# postgres: ash # For Ash Framework projects
# postgres: ecto # For Ecto/Phoenix projects
# postgres-image: timescale/timescaledb
# postgres-version: "18"
# SQLite support
# sqlite: ash # For Ash Framework projects
# sqlite: ecto # For Ecto projects
# Phoenix assets (npm-managed)
# npm-install: true
# npm-working-directory: assets
# npm-registry: https://npm.pkg.github.com
# node-version: "22"
# Spark DSL formatter
# spark-formatter: true
# spark-extensions: |
# MyApp.Resource.Extension
# System packages
# apt-packages: libvips-dev imagemagick
# Environment variables for all jobs
# env: |
# CLOAK_KEY=base64encodedkey
# Pre-built artifacts from upstream jobs
# artifacts: |
# my-binary:apps/my_app/priv/bin
# Private Hex packages
# hex-organization: intility
# secrets:
# hex-organization-key: ${{ secrets.HEX_ORGANIZATION_KEY }}
# Build and push OCI container image
release:
needs: test
if: github.event_name != 'pull_request'
permissions:
contents: read
packages: write
id-token: write
attestations: write
uses: intility/reusable-elixir/.github/workflows/elixir-release.yaml@8538d07c58d0c44e844e68a773ec729f21ee4ed7 # v2.2.1
with:
# Uses .tool-versions from your project (or specify explicitly)
# elixir-version: "1.19"
# otp-version: "28"
# Enable reproducible builds and layer caching
source-date-epoch: "0"
# Optional: Custom GHCR image name (defaults to ghcr.io/${{ github.repository }})
# image-name: my-elixir-app
# Optional: Override base image (defaults to project config)
# base-image: elixir:1.19-slim
# Optional: Multi-platform builds (requires include_erts: false)
# platforms: linux/amd64,linux/arm64
# Optional: Release name if multiple releases configured
# release: my_app
# Phoenix assets (Mix-managed, no npm)
# assets-deploy: true
# Install Tailwind binary before asset deploy
# tailwind-install: true
# Phoenix assets (npm-managed)
# npm-install: true
# npm-working-directory: assets
# npm-registry: https://npm.pkg.github.com
# node-version: "22"
# System packages
# apt-packages: libvips-dev
# Environment variables for the release job
# env: |
# MY_VAR=value
# Pre-built artifacts from upstream jobs
# artifacts: |
# my-binary:apps/my_app/priv/bin
# Private Hex packages
# hex-organization: intility
secrets: inherit