forked from tinuva/b1seplus-marlin-build
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (58 loc) · 1.86 KB
/
no-publish-build.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Ephemeral Container Firmware Build
on:
workflow_dispatch:
branches:
- main
jobs:
docker_image_build:
name: Build Docker Image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Preparation
id: prep
run: |
REGISTRY="ghcr.io"
IMAGE="${REGISTRY}/${{ github.repository }}/${{ github.event.repository.name }}"
TAGS="${IMAGE}:${{ github.sha }}"
if [[ $GITHUB_REF == ref/head/master ]]; then
TAGS="${TAGS},${IMAGE}:latest"
fi
echo ::set-output name=tags::${TAGS}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ github.event.repository.name }}
- uses: docker/build-push-action@v3
with:
context: .
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
firmware_build:
name: Build and push firmware
runs-on: ubuntu-latest
env:
BOARD: mks_robin_lite_maple
USE_REPO: https://github.com/schmttc/EasyThreeD-K7-STM32
USE_BRANCH: ET4000PLUS-K9
#USE_BRANCH: bugfix-2.0.x
#USE_TAG: 2.0.9.3
REGISTRY: ghcr.io
UPLOAD_DIR: ET4000PLUS-K9
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Compile firmware
run: |
docker run \
-u root:root \
-e BOARD \
-e USE_REPO \
-v $(pwd)/Firmware/Builds:/home/platformio/build \
-v $(pwd)/Firmware/Configuration:/home/platformio/CustomConfiguration \
ghcr.io/schmttc/marlin-build:working