-
Notifications
You must be signed in to change notification settings - Fork 13.5k
56 lines (48 loc) · 1.33 KB
/
compile_ubuntu.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
name: Ubuntu environment build
on:
push:
branches:
- 'main'
- 'stable'
- 'beta'
- 'release/**'
pull_request:
branches:
- '*'
jobs:
build_and_test:
name: Build and Test Ubuntu
runs-on: [runs-on,runner=8cpu-linux-x64,"image=ubuntu24-full-x64","run-id=${{ github.run_id }}"]
steps:
- id: date
name: Set Date as Tag
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- id: meta
name: Set Image Metadata
uses: docker/metadata-action@v5
with:
images: |
px4/px4-dev
ghcr.io/px4/px4-dev
tags: |
type=schedule,pattern={{date 'YYY-MM-DD'}}
- name: Build Docker Image
uses: docker/build-push-action@v6
with:
push: false
load: true
tags: ${{ steps.meta.outputs.tags }}
file: ./Tools/container/Dockerfile
- name: Test Docker Works
uses: addnab/docker-run-action@v3
with:
image: ${{ steps.meta.outputs.labels }}
run: echo "hello world"
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3