Sequencer-Docker-Publish #22287
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: Sequencer-Docker-Publish | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| - "APOLLO-*" | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| REGISTRY: ghcr.io | |
| REPO_NAME: ${{ github.repository }} | |
| RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" | |
| jobs: | |
| docker-build-push: | |
| runs-on: namespace-profile-small-ubuntu-24-04-amd64 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # Login to a Docker registry except on PR | |
| # https://github.com/docker/login-action | |
| - name: Login to registry ${{ env.REGISTRY }} | |
| uses: docker/[email protected] | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| logout: true | |
| # Extract metadata (tags, labels) for Docker | |
| # https://github.com/docker/metadata-action | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/[email protected] | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.REPO_NAME }}/sequencer | |
| tags: | | |
| # Tag-based releases | |
| type=raw,enable=${{ startsWith(github.ref, 'refs/tags/') && 'true' || 'false' }},value={{tag}} | |
| type=semver,pattern={{raw}} | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| # Manual workflow dispatch | |
| type=raw,value={{branch}}{{tag}}-{{sha}},enable=${{ github.event_name == 'workflow_dispatch' }} | |
| # Build and push Docker image with Buildx | |
| # https://github.com/docker/build-push-action | |
| - name: Build and push Docker image | |
| uses: docker/[email protected] | |
| with: | |
| context: . | |
| file: deployments/images/sequencer/Dockerfile | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: BUILD_MODE=release |