Skip to content

Commit 17427be

Browse files
committed
GitHub Actions to test the Dockerfile and publish to the DockerHub
1 parent bf3d330 commit 17427be

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Docker Image CI - Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
# Manual run
8+
workflow_dispatch:
9+
10+
jobs:
11+
12+
publish:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Docker Hub Login
19+
env:
20+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
21+
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
22+
run: |
23+
echo "$DOCKER_TOKEN" | docker login --username $DOCKER_USERNAME --password-stdin
24+
25+
- name: Build the Docker image
26+
run: |
27+
bash ./build.sh
28+
29+
- name: Docker Push
30+
run: |
31+
docker push -a radstudio/pa-radserver-ib
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Docker Image CI - Test
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
11+
test:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Build the Docker image
18+
run: |
19+
bash ./build.sh

0 commit comments

Comments
 (0)