Add publish workflow. #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: "0 0 * * 1" | |
workflow_dispatch: | |
jobs: | |
build-test-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 10 | |
- name: Install tools | |
shell: pwsh | |
run: | | |
Install-Module InvokeBuild -Force | |
- name: Build | |
shell: pwsh | |
run: | | |
Invoke-Build | |
- name: Test | |
shell: pwsh | |
run: | | |
Invoke-Build Test | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Publish | |
shell: pwsh | |
run: | | |
Invoke-Build Publish | |
- name: Log out from Docker Hub | |
run: | | |
docker logout |