This repository was archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.58 KB
/
Copy pathrt_thread-rt_smart.yml
File metadata and controls
52 lines (43 loc) · 1.58 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
name: 👷 rt_thread-rt_smart
on:
push:
paths:
- 'rt_thread/rt_smart/**'
- '.github/workflows/rt_thread-rt_smart.yml'
workflow_dispatch:
repository_dispatch:
types: [update-ubuntu_ci-22.04]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: ⬇️ checkout
uses: actions/checkout@v3
- name: ⬇️ set up qemu
uses: docker/setup-qemu-action@v2
- name: ⬇️ set up docker buildx
uses: docker/setup-buildx-action@v2
- name: 🔰 login to docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: 👷 build
uses: docker/build-push-action@v4
if: github.ref_name != 'master'
with:
context: rt_thread/rt_smart
file: ./rt_thread/rt_smart/Dockerfile
tags: csplink/rt_thread:rt_smart
- name: 👷 build and push
uses: docker/build-push-action@v4
if: github.ref_name == 'master'
with:
push: true
context: rt_thread/rt_smart
file: ./rt_thread/rt_smart/Dockerfile
tags: csplink/rt_thread:rt_smart
- name: 🐒 trigger repository_dispatch
if: github.ref_name == 'master'
run: |
curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ github.token }}" https://api.github.com/repos/${{ github.repository }}/dispatches -d '{"event_type":"update-rt_thread-rt_smart","client_payload":{"text": "update rt_thread rt_smart"}}'