-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.32 KB
/
build.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
name: Build and push images
on:
workflow_dispatch:
inputs:
gitRef:
description: Commit, tag or branch name to deploy
required: true
type: string
default: main
noPushToRegistry:
description: Build only, skip pushing to registry
required: true
type: boolean
default: false
# push:
# branches:
# - main
# schedule:
# - cron: '0 3 * * *'
jobs:
build_and_push:
name: Build ruby_${{ matrix.version }} images and push to GHCR
runs-on: ubuntu-22.04
strategy:
matrix:
version: ['3_2', '3_3']
permissions:
packages: write
steps:
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
ref: ${{ inputs.gitRef }}
show-progress: false
token: ${{ secrets.PUBLISHING_PLATFORM_CI_GITHUB_API_TOKEN }}
- name: Build images (without pushing to registry)
if: ${{ inputs.noPushToRegistry }}
env:
DRY_RUN: "1"
run: ./build.sh ${{ matrix.version }}
- name: Build and push images
if: ${{ !inputs.noPushToRegistry }}
run: ./build.sh ${{ matrix.version }}