diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..47c1899 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,50 @@ +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