forked from kubernetes-sigs/image-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 905 Bytes
/
build-image-builder.yml
File metadata and controls
37 lines (31 loc) · 905 Bytes
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
name: Build CAPI image builder
on:
push:
branches:
- main
pull_request:
env:
IMAGE_NAME: image-builder
REGISTRY: ghcr.io/elastisys
jobs:
build-image-builder:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Get branch name
id: get-branch-name
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_OUTPUT
else
echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
fi
shell: bash
- name: run make docker-build
run: make docker-build
env:
TAG: ${{ steps.get-branch-name.outputs.BRANCH_NAME }}-${{ github.sha }}
- name: run make docker-push
run: make docker-push
env:
TAG: ${{ steps.get-branch-name.outputs.BRANCH_NAME }}-${{ github.sha }}