Skip to content

Commit 15ca9b6

Browse files
authored
ci: Add Docker build and push workflow for automated releases (#122)
Signed-off-by: soonhong99 <[email protected]>
1 parent e7d926b commit 15ca9b6

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Docker Build and Push
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-and-push:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
14+
- name: Set up QEMU
15+
uses: docker/setup-qemu-action@v1
16+
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v1
19+
20+
- name: Login to DockerHub
21+
uses: docker/login-action@v1
22+
with:
23+
username: ${{ secrets.DOCKERHUB_USERNAME }}
24+
password: ${{ secrets.DOCKERHUB_TOKEN }}
25+
26+
- name: Build and push
27+
uses: docker/build-push-action@v2
28+
with:
29+
context: .
30+
push: true
31+
platforms: linux/amd64,linux/arm64
32+
tags: |
33+
fosslight/fosslight_scanner:latest
34+
fosslight/fosslight_scanner:${{ github.event.release.tag_name }}

0 commit comments

Comments
 (0)