forked from lf-edge/eve
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (68 loc) · 2.26 KB
/
buildyetusondemand.yml
File metadata and controls
73 lines (68 loc) · 2.26 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
# Copyright (c) 2025, Zededa, Inc.
# SPDX-License-Identifier: Apache-2.0
---
name: Yetus image - build and publish on demand
on: # yamllint disable-line rule:truthy
workflow_dispatch:
inputs:
force:
description: 'Force build even if no changes'
type: boolean
required: false
default: false
env:
FORCE_BUILD: FORCE_BUILD=${{ inputs.force && '--force' || '' }}
permissions: {}
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
yetus-image:
# Only run for the default branch
if: github.ref_name == github.event.repository.default_branch
runs-on: zededa-ubuntu-2204
permissions:
contents: read
env:
HEAD_REF: ${{ github.event.pull_request.head.ref }}
REPO_NAME: ${{ github.event.repository.full_name }}
IMG_NAME: "renezededa/eve-yetus"
IMG_TAG: "0.15.1-eve-1"
strategy:
fail-fast: false
steps:
- name: Starting Report
run: |
echo Git Ref: "${HEAD_REF}"
echo GitHub Event: ${{ github.event_name }}
echo Disk usage
df -h
echo Memory
free -m
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
persist-credentials: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: ${{ env.REPO_NAME == 'rene/eve' }}
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
username: ${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }}
password: ${{ secrets.RELEASE_DOCKERHUB_TOKEN }}
- name: Build and push Yetus image
run: |
docker buildx build --platform linux/amd64,linux/arm64 --push --tag ${{ env.IMG_NAME }}:${{ env.IMG_TAG }} tools/yetus
- name: Post package report
run: |
echo Disk usage
df -h
echo Memory
free -m
- name: Clean up
run: |
docker system prune -f -a || :
docker rm -f $(docker ps -aq) && docker volume rm -f $(docker volume ls -q) || :