publish #56
This file contains hidden or 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 | |
# Build, test and publish official Docker images. | |
# - Triggers: Pushes to master and scheduled weekly runs. | |
# - Runs on: Only the official repository (FirebirdSQL/firebird-docker) | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: "0 0 * * 1" # Every Monday at midnight | |
workflow_dispatch: # Allows manual dispatch | |
# Only a single instance of this workflow can be in execution at a given time. | |
concurrency: | |
group: ${{ github.workflow }} | |
jobs: | |
build-test-and-publish: | |
if: ${{ github.repository == 'FirebirdSQL/firebird-docker' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 10 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- 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: Upload logs | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: publish-logs-${{ github.run_id }} | |
path: generated/logs | |
retention-days: 30 # Longer log retention for published images |