Skip to content

Commit c9285f0

Browse files
update ci
1 parent f33cbfb commit c9285f0

File tree

1 file changed

+5
-29
lines changed

1 file changed

+5
-29
lines changed
Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,11 @@
1-
name: "Build and push Docker image for release"
2-
31
on:
42
release:
53
types: [published]
4+
pull_request:
5+
branches: ["main"]
66

77
jobs:
88
push_to_registry:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- name: Get release version
12-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
13-
14-
- name: Checkout repo
15-
uses: actions/checkout@v2
16-
17-
- name: Set up QEMU for multi-arch builds
18-
uses: docker/setup-qemu-action@v1
19-
20-
- name: Set up Docker buildx for multi-arch builds
21-
uses: docker/setup-buildx-action@v1
22-
23-
- name: Login to Docker Hub
24-
uses: docker/login-action@v1
25-
with:
26-
username: ${{ secrets.DOCKER_USERNAME }}
27-
password: ${{ secrets.DOCKER_PASSWORD }}
28-
29-
- name: Build and push
30-
uses: docker/build-push-action@v2
31-
with:
32-
context: .
33-
platforms: linux/amd64,linux/arm64
34-
push: true
35-
tags: waggle/${{ github.event.repository.name }}:${{ env.RELEASE_VERSION }}
9+
name: Build
10+
uses: waggle-sensor/.github/.github/workflows/build-and-push-docker-image.yml@main
11+
secrets: inherit

0 commit comments

Comments
 (0)