Merge pull request #16 from dimetron/main #6
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: Tag and Push | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version number' | |
| # https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#release | |
| # GITHUB_SHA = Last commit in the tagged release | |
| # GITHUB_REF = Tag ref of release refs/tags/<tag_name> | |
| jobs: | |
| push-images: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: 'Checkout GitHub Action' | |
| uses: actions/checkout@main | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: 'Build Images' | |
| env: | |
| DOCKER_BUILD_ARGS: "--push --platform linux/amd64,linux/arm64" | |
| run: | | |
| # if workflow_dispatch is used, use the version input | |
| if [ -n "${{ github.event.inputs.version }}" ]; then | |
| export VERSION=${{ github.event.inputs.version }} | |
| else | |
| export VERSION=$(echo "$GITHUB_REF" | cut -c12-) | |
| fi | |
| make build-mcp | |
| release: | |
| # Only run release after images and helm chart are pushed | |
| # In the future we can take the chart from the helm action, | |
| # and build the CLI beforehand. | |
| needs: | |
| - push-images | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') |