-
-
Notifications
You must be signed in to change notification settings - Fork 11
Firebird Docker v2 #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
fdcastel
wants to merge
30
commits into
FirebirdSQL:master
Choose a base branch
from
fdcastel:feature/v2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 23 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
c9090b5
Phase 0: Foundation
fdcastel 378b7f6
Phase 1: Dockerfile & Entrypoint rewrite
fdcastel e540e72
Phase 2: Build System rewrite
fdcastel 99c85a6
Phase 3: Tagging System
fdcastel 2d5c601
Phase 4: CI/CD Workflows
fdcastel fb59b60
Phase 5: Snapshot / Pre-release Images
fdcastel a9e1c88
Phase 6: New tests
fdcastel adf319a
Phase 7: Documentation & Housekeeping
fdcastel 258f2da
Fix Wait-Port/Test-Port parameter bugs and remove redundant Start-Sleep
fdcastel ea84133
Incorporate user edits to AGENTS.md and Dockerfile.template
fdcastel 0cc84fc
Phase 4: Add ARM64 native runners and split publish workflow
fdcastel 8fde8f7
Phase 5: Add snapshot and architecture sections to README
fdcastel dbaac41
Phase 6: Add _FILE variant tests, tag correctness test, mutual exclus…
fdcastel 563e0a8
Phase 7: Add CONTRIBUTING.md
fdcastel 1bb5c8a
Update GitHub Actions workflows to use actions/checkout@v5 and remove…
fdcastel bb9c604
Add fork publishing to GitHub Container Registry (ghcr.io)
fdcastel 42efd40
Fix publish-fork staging packages; move dev notes to CONTRIBUTING.md
fdcastel b0597b6
Fix staging packages in multi-arch publish; update docker/login-actio…
fdcastel f06b5f4
Fix image tests to pass against Firebird 6 snapshots
fdcastel 87b6c02
Add Test-Published task for testing images from a registry
fdcastel 3bf7a7a
Upgrade actions/checkout from v5 to v6 in CI workflows
fdcastel 35cd03d
Address review: uniform CI matrix, fix README alignment, clarify tag …
fdcastel 3fbd9a1
Fix Test task: skip arm64-unsupported versions on arm64 runners
fdcastel b411e34
Add documentation for ARM64 build process in GitHub Actions
fdcastel 4a24602
ci: build only latest-per-major on fork pushes
fdcastel d20c31c
docs: update comment for staging packages in publish-fork workflow
fdcastel 0bd74f9
Switch to digest-based multi-arch assembly (no staging tags)
fdcastel b61de02
ci: auto-commit generated Dockerfiles and update README after publish
fdcastel c1b7ec6
chore: update generated Dockerfiles and README [skip ci]
github-actions[bot] f04f86d
fix: use Contains instead of ContainsKey on OrderedDictionary
fdcastel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1 @@ | ||
| # These are supported funding model platforms | ||
|
|
||
| github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
| patreon: # Replace with a single Patreon username | ||
| open_collective: # Replace with a single Open Collective username | ||
| ko_fi: # Replace with a single Ko-fi username | ||
| tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
| community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
| liberapay: # Replace with a single Liberapay username | ||
| issuehunt: # Replace with a single IssueHunt username | ||
| lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry | ||
| polar: # Replace with a single Polar username | ||
| buy_me_a_coffee: # Replace with a single Buy Me a Coffee username | ||
| thanks_dev: # Replace with a single thanks.dev username | ||
| custom: https://firebirdsql.org/en/donate/ |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,235 @@ | ||
| name: publish-fork | ||
|
|
||
| # Build, test and publish Docker images to GitHub Container Registry (ghcr.io). | ||
| # - Triggers: Manual dispatch only (workflow_dispatch) | ||
| # - Runs on: Any fork (uses built-in GITHUB_TOKEN — no extra secrets required) | ||
| # | ||
| # Images are published to ghcr.io/<owner>/firebird | ||
| # Default scope: latest Firebird version + bookworm (fast, ~2 minutes) | ||
| # Default result: ONE package — ghcr.io/<owner>/firebird — with all expected tags. | ||
| # | ||
| # With include-arm64=true: publishes ghcr.io/<owner>/firebird as a multi-arch image | ||
| # (plus temporary staging packages firebird-amd64 / firebird-arm64 needed for manifest creation). | ||
| # | ||
| # Usage: | ||
| # Go to Actions → publish-fork → Run workflow | ||
| # Pull with: docker pull ghcr.io/<your-username>/firebird:<tag> | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version-filter: | ||
| description: 'Version filter (e.g. 5, 5.0.3). Empty = latest only.' | ||
| required: false | ||
| type: string | ||
| distro-filter: | ||
| description: 'Distro filter (e.g. bookworm, jammy). Empty = default distro (bookworm).' | ||
| required: false | ||
| type: string | ||
| include-arm64: | ||
| description: 'Also build ARM64 images (takes ~2x longer; produces extra staging packages).' | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| include-snapshots: | ||
| description: 'Also build and publish snapshot images (6-snapshot, 5-snapshot).' | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
|
|
||
| # Only one run at a time per fork. | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.repository }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| REGISTRY: ghcr.io/${{ github.repository_owner }} | ||
| IMAGE_NAME: firebird | ||
|
|
||
| jobs: | ||
| determine-scope: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| version-filter: ${{ steps.scope.outputs.version-filter }} | ||
| distro-filter: ${{ steps.scope.outputs.distro-filter }} | ||
| matrix: ${{ steps.scope.outputs.matrix }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Determine build scope | ||
| id: scope | ||
| shell: pwsh | ||
| run: | | ||
| $assets = Get-Content -Raw ./assets.json | ConvertFrom-Json | ||
|
|
||
| # Use input or default to latest version + default distro | ||
| $vf = '${{ inputs.version-filter }}' | ||
| $df = '${{ inputs.distro-filter }}' | ||
| if (-not $vf) { $vf = $assets.versions[0].version } | ||
| if (-not $df) { $df = $assets.config.defaultDistro } | ||
|
|
||
| "version-filter=$vf" >> $env:GITHUB_OUTPUT | ||
| "distro-filter=$df" >> $env:GITHUB_OUTPUT | ||
|
|
||
| # Build arch matrix based on input | ||
| $includeArm64 = '${{ inputs.include-arm64 }}' -eq 'true' | ||
| $matrix = if ($includeArm64) { | ||
| '{"arch":["amd64","arm64"],"include":[{"arch":"amd64","runner":"ubuntu-latest"},{"arch":"arm64","runner":"ubuntu-24.04-arm"}]}' | ||
| } else { | ||
| '{"arch":["amd64"],"include":[{"arch":"amd64","runner":"ubuntu-latest"}]}' | ||
| } | ||
| "matrix=$matrix" >> $env:GITHUB_OUTPUT | ||
|
|
||
| build-and-push: | ||
| needs: determine-scope | ||
| permissions: | ||
| packages: write | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: ${{ fromJSON(needs.determine-scope.outputs.matrix) }} | ||
| runs-on: ${{ matrix.runner }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Install tools | ||
| shell: pwsh | ||
| run: | | ||
| Install-Module InvokeBuild -Force | ||
| Install-Module PSFirebird -MinimumVersion '1.0.0' -Force | ||
|
|
||
| - name: Build | ||
| shell: pwsh | ||
| run: | | ||
| Invoke-Build Build ` | ||
| -VersionFilter '${{ needs.determine-scope.outputs.version-filter }}' ` | ||
| -DistributionFilter '${{ needs.determine-scope.outputs.distro-filter }}' ` | ||
| -Registry '${{ env.REGISTRY }}' | ||
|
|
||
| - name: Test | ||
| shell: pwsh | ||
| run: | | ||
| Invoke-Build Test ` | ||
| -VersionFilter '${{ needs.determine-scope.outputs.version-filter }}' ` | ||
| -DistributionFilter '${{ needs.determine-scope.outputs.distro-filter }}' ` | ||
| -Registry '${{ env.REGISTRY }}' | ||
|
|
||
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v4 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| # amd64-only: push as the final image name — produces exactly ONE package. | ||
| - name: Push (amd64 only — final name, no staging) | ||
| if: ${{ !inputs.include-arm64 }} | ||
| shell: pwsh | ||
| run: | | ||
| Invoke-Build Publish-Direct ` | ||
| -VersionFilter '${{ needs.determine-scope.outputs.version-filter }}' ` | ||
| -DistributionFilter '${{ needs.determine-scope.outputs.distro-filter }}' ` | ||
| -Registry '${{ env.REGISTRY }}' | ||
|
|
||
| # multi-arch: push with -amd64/-arm64 staging suffixes for later manifest creation. | ||
| - name: Push (staging for multi-arch manifest) | ||
| if: ${{ inputs.include-arm64 }} | ||
| shell: pwsh | ||
| run: | | ||
| Invoke-Build Publish-Arch ` | ||
| -VersionFilter '${{ needs.determine-scope.outputs.version-filter }}' ` | ||
| -DistributionFilter '${{ needs.determine-scope.outputs.distro-filter }}' ` | ||
| -Registry '${{ env.REGISTRY }}' | ||
|
|
||
| - name: Build and push snapshot images | ||
| if: ${{ inputs.include-snapshots && matrix.arch == 'amd64' }} | ||
| shell: pwsh | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| foreach ($branch in @('master', 'v5.0-release')) { | ||
| Invoke-Build Build-Snapshot -Branch $branch -Registry '${{ env.REGISTRY }}' | ||
| $tag = if ($branch -eq 'master') { '6-snapshot' } else { '5-snapshot' } | ||
| docker push "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$tag" | ||
| } | ||
|
|
||
| # Summary only for the amd64-only case (multi-arch summary is in create-manifests). | ||
| - name: Summary | ||
| if: ${{ !inputs.include-arm64 && matrix.arch == 'amd64' }} | ||
| shell: pwsh | ||
| run: | | ||
| $vf = '${{ needs.determine-scope.outputs.version-filter }}' | ||
| $df = '${{ needs.determine-scope.outputs.distro-filter }}' | ||
| $registry = '${{ env.REGISTRY }}' | ||
| $imageName = '${{ env.IMAGE_NAME }}' | ||
|
|
||
| $assets = Get-Content -Raw ./assets.json | ConvertFrom-Json | ||
| $filtered = $assets.versions | Where-Object { $_.version -like "$vf*" } | ||
| $tags = $filtered | ForEach-Object { $_.tags.$df } | Select-Object -First 5 | ||
|
|
||
| @" | ||
| ## Published to GitHub Container Registry | ||
|
|
||
| **Registry:** ``$registry/$imageName`` | ||
|
|
||
| ### Pull commands | ||
| `````` | ||
| $(($tags | ForEach-Object { "docker pull $registry/${imageName}:$_" }) -join "`n") | ||
| `````` | ||
| "@ >> $env:GITHUB_STEP_SUMMARY | ||
|
|
||
| # Only runs when include-arm64=true. Creates multi-arch OCI manifests from staging images. | ||
| create-manifests: | ||
| if: ${{ inputs.include-arm64 }} | ||
| needs: [determine-scope, build-and-push] | ||
| permissions: | ||
| packages: write | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Install tools | ||
| shell: pwsh | ||
| run: | | ||
| Install-Module InvokeBuild -Force | ||
| Install-Module PSFirebird -MinimumVersion '1.0.0' -Force | ||
|
|
||
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v4 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Create and push multi-arch manifests | ||
| shell: pwsh | ||
| run: | | ||
| Invoke-Build Publish-Manifests ` | ||
| -VersionFilter '${{ needs.determine-scope.outputs.version-filter }}' ` | ||
| -DistributionFilter '${{ needs.determine-scope.outputs.distro-filter }}' ` | ||
| -Registry '${{ env.REGISTRY }}' | ||
|
|
||
| - name: Summary | ||
| shell: pwsh | ||
| run: | | ||
| $vf = '${{ needs.determine-scope.outputs.version-filter }}' | ||
| $df = '${{ needs.determine-scope.outputs.distro-filter }}' | ||
| $registry = '${{ env.REGISTRY }}' | ||
| $imageName = '${{ env.IMAGE_NAME }}' | ||
|
|
||
| $assets = Get-Content -Raw ./assets.json | ConvertFrom-Json | ||
| $filtered = $assets.versions | Where-Object { $_.version -like "$vf*" } | ||
| $tags = $filtered | ForEach-Object { $_.tags.$df } | Select-Object -First 5 | ||
|
|
||
| @" | ||
| ## Published to GitHub Container Registry (multi-arch) | ||
|
|
||
| **Registry:** ``$registry/$imageName`` | ||
|
|
||
| ### Pull commands | ||
| `````` | ||
| $(($tags | ForEach-Object { "docker pull $registry/${imageName}:$_" }) -join "`n") | ||
| `````` | ||
| "@ >> $env:GITHUB_STEP_SUMMARY |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.