Skip to content

Commit d5fa5a3

Browse files
committed
workflows
1 parent 6534f65 commit d5fa5a3

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

.github/workflows/compile.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,23 @@
1+
name: build-test
12

3+
on:
4+
workflow_run:
5+
workflows: ["setup"]
6+
types:
7+
- completed
28

9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Pull Docker image
15+
run: docker pull ${{ secrets.DOCKERHUB_USERNAME }}/kestrel:latest
16+
17+
- name: build
18+
run: |
19+
docker run --rm \
20+
-v ${{ github.workspace }}:/workspace \
21+
-w /workspace/src \
22+
${{ secrets.DOCKERHUB_USERNAME }}/kestrel:latest \
23+
bash -c "colcon build"

.github/workflows/prebuild.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: setup
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- pathing_and_workflows
8+
9+
jobs:
10+
build-and-push:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: checkout
15+
uses: actions/checkout@v4
16+
17+
- name: login
18+
uses: docker/login-action@v3
19+
with:
20+
username: ${{ secrets.DOCKERHUB_USERNAME }}
21+
password: ${{ secrets.DOCKERHUB_TOKEN }}
22+
23+
- name: buildx
24+
uses: docker/setup-buildx-action@v3
25+
26+
- name: build
27+
uses: docker/build-push-action@v5
28+
with:
29+
context: ./src
30+
file: ./src/Containerfile
31+
push: true
32+
tags: |
33+
${{ secrets.DOCKERHUB_USERNAME }}/kestrel:latest
34+
${{ secrets.DOCKERHUB_USERNAME }}/kestrel:${{ github.sha }}

0 commit comments

Comments
 (0)