Skip to content

Commit a0fac8a

Browse files
committed
Add publish workflow.
1 parent 97598c9 commit a0fac8a

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: publish
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
schedule:
8+
- cron: "0 0 * * 1"
9+
workflow_dispatch:
10+
11+
jobs:
12+
13+
build-test-publish:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 10
21+
22+
- name: Install tools
23+
shell: pwsh
24+
run: |
25+
Install-Module InvokeBuild -Force
26+
27+
- name: Build
28+
shell: pwsh
29+
run: |
30+
Invoke-Build
31+
32+
- name: Test
33+
shell: pwsh
34+
run: |
35+
Invoke-Build Test
36+
37+
- name: Login to Docker Hub
38+
uses: docker/login-action@v3
39+
with:
40+
username: ${{ secrets.DOCKERHUB_USERNAME }}
41+
password: ${{ secrets.DOCKERHUB_TOKEN }}
42+
43+
- name: Publish
44+
shell: pwsh
45+
run: |
46+
Invoke-Build Publish
47+
48+
- name: Log out from Docker Hub
49+
run: |
50+
docker logout

0 commit comments

Comments
 (0)