fix(release): publish installable v0.4.1 #2
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 | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: read | |
| jobs: | |
| images: | |
| name: ${{ matrix.name }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: API image | |
| image: opencli-admin-api | |
| context: . | |
| file: Dockerfile | |
| build_args: | | |
| IMAGE_TAG=__VERSION__ | |
| suffix: "" | |
| - name: Frontend image | |
| image: opencli-admin-frontend | |
| context: ./frontend | |
| file: ./frontend/Dockerfile | |
| build_args: | | |
| BACKEND_URL=http://api:8000 | |
| suffix: "" | |
| - name: Agent image | |
| image: opencli-admin-agent | |
| context: . | |
| file: ./agent/Dockerfile | |
| build_args: "" | |
| suffix: "" | |
| - name: Interactive Chrome image | |
| image: opencli-admin-chrome | |
| context: . | |
| file: ./chrome/Dockerfile | |
| build_args: "" | |
| suffix: "" | |
| - name: Agent Chrome image | |
| image: opencli-admin-agent | |
| context: . | |
| file: ./agent/Dockerfile | |
| suffix: "-chrome" | |
| build_args: | | |
| INSTALL_CHROME=true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Resolve release version | |
| id: version | |
| shell: bash | |
| run: echo "value=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" | |
| - name: Resolve build arguments | |
| id: build_args | |
| shell: bash | |
| env: | |
| MATRIX_BUILD_ARGS: ${{ matrix.build_args }} | |
| RELEASE_VERSION: ${{ steps.version.outputs.value }} | |
| run: | | |
| { | |
| echo "value<<EOF" | |
| printf '%s\n' "$MATRIX_BUILD_ARGS" | sed "s/__VERSION__/$RELEASE_VERSION/g" | |
| echo "EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ${{ matrix.context }} | |
| file: ${{ matrix.file }} | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| build-args: ${{ steps.build_args.outputs.value }} | |
| tags: | | |
| ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}:${{ steps.version.outputs.value }}${{ matrix.suffix }} | |
| ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}:latest${{ matrix.suffix }} | |
| cache-from: type=gha,scope=${{ matrix.name }} | |
| cache-to: type=gha,mode=max,scope=${{ matrix.name }} | |
| provenance: mode=max | |
| sbom: true | |
| github-release: | |
| name: GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: images | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: | | |
| docker-compose.yml | |
| docker-compose.build.yml | |
| .env.docker.example | |
| scripts/install.sh | |
| scripts/install.ps1 |