chore: backport 20260527 (#1317) #23
Workflow file for this run
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: Release Images | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Release tag (e.g., v1.0.0)" | |
| required: true | |
| type: string | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| REGISTRY: ghcr.io | |
| HUB_AGENT_IMAGE_NAME: hub-agent | |
| MEMBER_AGENT_IMAGE_NAME: member-agent | |
| REFRESH_TOKEN_IMAGE_NAME: refresh-token | |
| GO_VERSION: "1.25.10" | |
| jobs: | |
| export-registry: | |
| uses: ./.github/workflows/setup-release.yml | |
| with: | |
| tag: ${{ inputs.tag || github.ref_name }} | |
| build-and-publish: | |
| needs: export-registry | |
| env: | |
| REGISTRY: ${{ needs.export-registry.outputs.registry }} | |
| TAG: ${{ needs.export-registry.outputs.tag }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go ${{ env.GO_VERSION }} | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| ref: ${{ needs.export-registry.outputs.tag }} | |
| - name: Login to ghcr.io | |
| uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push images with tag ${{ env.TAG }} | |
| run: | | |
| make push | |
| - name: Tag and push images without v prefix | |
| env: | |
| VERSION: ${{ needs.export-registry.outputs.version }} | |
| run: | | |
| for IMAGE in ${{ env.HUB_AGENT_IMAGE_NAME }} ${{ env.MEMBER_AGENT_IMAGE_NAME }} ${{ env.REFRESH_TOKEN_IMAGE_NAME }}; do | |
| docker buildx imagetools create \ | |
| --tag "${{ env.REGISTRY }}/${IMAGE}:${VERSION}" \ | |
| "${{ env.REGISTRY }}/${IMAGE}:${{ env.TAG }}" | |
| done | |
| - name: Verify images | |
| env: | |
| VERSION: ${{ needs.export-registry.outputs.version }} | |
| run: | | |
| echo "✅ Published images:" | |
| echo " - ${{ env.REGISTRY }}/${{ env.HUB_AGENT_IMAGE_NAME }}:${{ env.TAG }}" | |
| echo " - ${{ env.REGISTRY }}/${{ env.HUB_AGENT_IMAGE_NAME }}:${VERSION}" | |
| echo " - ${{ env.REGISTRY }}/${{ env.MEMBER_AGENT_IMAGE_NAME }}:${{ env.TAG }}" | |
| echo " - ${{ env.REGISTRY }}/${{ env.MEMBER_AGENT_IMAGE_NAME }}:${VERSION}" | |
| echo " - ${{ env.REGISTRY }}/${{ env.REFRESH_TOKEN_IMAGE_NAME }}:${{ env.TAG }}" | |
| echo " - ${{ env.REGISTRY }}/${{ env.REFRESH_TOKEN_IMAGE_NAME }}:${VERSION}" |