-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 959 Bytes
/
ci.yml
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
name: CI
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- "**"
workflow_dispatch:
env:
REGISTRY: "ghcr.io"
NAMESPACE: "${{ github.repository }}"
PLATFORMS: linux/amd64,linux/arm64
jobs:
expose-vars:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
outputs:
REGISTRY: ${{ env.REGISTRY }}
NAMESPACE: ${{ env.NAMESPACE }}
PLATFORMS: ${{ env.PLATFORMS }}
steps:
- name: Exposing env vars
run: echo "Exposing env vars"
build:
uses: ./.github/workflows/build.yml
needs:
- expose-vars
permissions:
packages: write
with:
REGISTRY: ${{ needs.expose-vars.outputs.REGISTRY }}
NAMESPACE: ${{ needs.expose-vars.outputs.NAMESPACE }}
PLATFORMS: ${{ needs.expose-vars.outputs.PLATFORMS }}
TAG: pr-${{ github.event.pull_request.number || github.event.number }}