(feat) Adding capabability to append suffix to build images #1
  
    
      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: Docker Test Build | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: Git branch, or tag to build from. | ||
| required: false | ||
| target: | ||
| description: Target to build. | ||
| required: false | ||
| type: choice | ||
| options: | ||
| - auctioneer | ||
| - composer | ||
| - conductor | ||
| - sequencer | ||
| - sequencer-relayer | ||
| - evm-bridge-withdrawer | ||
| - cli | ||
| merge_group: | ||
| push: | ||
| branches: | ||
| - "main" | ||
| tags: | ||
| - "**-v[0-9]+.[0-9]+.[0-9]+" | ||
| - "**-v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" | ||
| - "**-v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" | ||
| - "**-v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+" | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| - reopened | ||
| - labeled | ||
| jobs: | ||
| run_checker: | ||
| uses: ./.github/workflows/reusable-run-checker.yml | ||
| auctioneer: | ||
| needs: run_checker | ||
| if: needs.run_checker.outputs.run_docker == 'true' || (github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'auctioneer') | ||
| uses: "./.github/workflows/reusable-docker-build.yml" | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| packages: write | ||
| with: | ||
| depot-project-id: 0q41v32h7j | ||
| package-name: auctioneer | ||
| binary-name: auctioneer | ||
| tag: ${{ inputs.tag }} | ||
| force: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'auctioneer' }} | ||
| # Add suffix for test images | ||
| image-suffix: release-test | ||
| secrets: inherit | ||
| composer: | ||
| needs: run_checker | ||
| if: needs.run_checker.outputs.run_docker == 'true' || (github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'composer') | ||
| uses: "./.github/workflows/reusable-docker-build.yml" | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| packages: write | ||
| with: | ||
| depot-project-id: 0q41v32h7j | ||
| package-name: composer | ||
| binary-name: composer | ||
| tag: ${{ inputs.tag }} | ||
| force: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'composer' }} | ||
| image-suffix: release-test | ||
| secrets: inherit | ||
| # ... repeat for other components ... | ||
| smoke-test: | ||
| needs: [run_checker, composer, conductor, sequencer, sequencer-relayer, evm-bridge-withdrawer, cli] | ||
| Check failure on line 79 in .github/workflows/docker-build-test.yml 
     | ||
| if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'astriaorg/astria') && (github.event_name == 'merge_group' || needs.run_checker.outputs.run_docker == 'true') | ||
| runs-on: depot-ubuntu-24.04-8 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install just | ||
| uses: taiki-e/install-action@just | ||
| - name: Install kind | ||
| uses: helm/kind-action@v1 | ||
| with: | ||
| install_only: true | ||
| - name: Log in to GHCR | ||
| uses: docker/login-action@v2 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Setup Smoke Test Environment | ||
| timeout-minutes: 10 | ||
| run: | | ||
| TAG=sha-$(git rev-parse --short HEAD) | ||
| just deploy cluster | ||
| kubectl create secret generic regcred --from-file=.dockerconfigjson=$HOME/.docker/config.json --type=kubernetes.io/dockerconfigjson | ||
| echo -e "\n\nDeploying with astria images tagged $TAG" | ||
| # Modify the deployment to use test images | ||
| just deploy smoke-test $TAG release-test | ||
| # ... rest of the jobs ... | ||