chore: release (#1229) #189
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: Docker | |
| on: | |
| push: | |
| tags: | |
| - 'moq-relay-v*' | |
| - 'moq-cli-v*' | |
| - 'moq-token-cli-v*' | |
| env: | |
| REGISTRY: docker.io/moqdev | |
| jobs: | |
| deploy: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # Figure out the docker image based on the tag | |
| - id: parse | |
| run: | | |
| ref=${GITHUB_REF#refs/tags/} | |
| if [[ "$ref" =~ ^([a-z-]+)-v([0-9.]+)$ ]]; then | |
| target="${BASH_REMATCH[1]}" | |
| version="${BASH_REMATCH[2]}" | |
| echo "target=$target" >> $GITHUB_OUTPUT | |
| echo "version=$version" >> $GITHUB_OUTPUT | |
| else | |
| echo "Tag format not recognized." >&2 | |
| exit 1 | |
| fi | |
| # I'm paying for Depot for faster ARM builds. | |
| - uses: depot/setup-action@v1 | |
| # Login to docker.io | |
| - uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| # Build and push multi-arch Docker images using Depot | |
| - uses: depot/build-push-action@v1 | |
| with: | |
| project: r257ctfqm6 | |
| context: . | |
| push: true | |
| # Make a smaller image by specifying the package to build | |
| build-args: | | |
| package=${{ steps.parse.outputs.target }} | |
| tags: | | |
| ${{ env.REGISTRY }}/${{ steps.parse.outputs.target }}:${{ steps.parse.outputs.version }} | |
| ${{ env.REGISTRY }}/${{ steps.parse.outputs.target }}:latest | |
| platforms: linux/amd64,linux/arm64 |