-
Notifications
You must be signed in to change notification settings - Fork 54
41 lines (39 loc) · 1.13 KB
/
push-images.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
name: Build and push images
on:
workflow_dispatch:
inputs:
ref:
type: string
required: true
platforms:
type: string
default: linux/x86_64,linux/arm64
jobs:
build-toolkit:
permissions:
packages: write
runs-on: ubuntu-latest
env:
TOOLKIT_REPO: ghcr.io/${{github.repository}}/elemental-cli
REPO: ghcr.io/${{github.repository}}/elemental-${{ github.event.inputs.flavor }}
steps:
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
- run: |
git fetch --prune --unshallow
- name: Log in to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build toolkit
run: |
make PLATFORM=${{ github.event.inputs.platforms }} DOCKER_ARGS=--push VERSION=${{ github.event.inputs.ref }} build