feat: add macOS app icon support and update icon generation process #11
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 Docker Images | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| DOCKERHUB_NAMESPACE: interaapps | |
| concurrency: | |
| group: release-docker-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| publish-images: | |
| name: Publish ${{ matrix.image_name }} image | |
| runs-on: ubuntu-latest | |
| env: | |
| DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
| DOCKERHUB_TOKEN: ${{ secrets.DOCKER_PASSWORD }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - image_name: backend | |
| dockerfile: Dockerfile.backend | |
| - image_name: frontend | |
| dockerfile: Dockerfile.frontend | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Log in to Docker Hub | |
| if: env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != '' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ env.DOCKERHUB_USERNAME }} | |
| password: ${{ env.DOCKERHUB_TOKEN }} | |
| - name: Compute image names | |
| id: image | |
| shell: bash | |
| run: | | |
| repository="$(echo "${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]')" | |
| ghcr_image="ghcr.io/${repository}-${{ matrix.image_name }}" | |
| echo "repository=${repository}" >> "${GITHUB_OUTPUT}" | |
| if [ "${{ matrix.image_name }}" = "backend" ]; then | |
| dockerhub_image="docker.io/${DOCKERHUB_NAMESPACE}/starquery" | |
| else | |
| dockerhub_image="docker.io/${DOCKERHUB_NAMESPACE}/starquery-${{ matrix.image_name }}" | |
| fi | |
| echo "ghcr_image=${ghcr_image}" >> "${GITHUB_OUTPUT}" | |
| echo "dockerhub_image=${dockerhub_image}" >> "${GITHUB_OUTPUT}" | |
| { | |
| echo "images<<EOF" | |
| echo "${ghcr_image}" | |
| if [ -n "${DOCKERHUB_USERNAME}" ] && [ -n "${DOCKERHUB_TOKEN}" ]; then | |
| echo "${dockerhub_image}" | |
| fi | |
| echo "EOF" | |
| } >> "${GITHUB_OUTPUT}" | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ steps.image.outputs.images }} | |
| tags: | | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=ref,event=tag | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| type=sha,prefix=sha- | |
| - name: Build and push image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ${{ matrix.dockerfile }} | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha,scope=${{ matrix.image_name }} | |
| cache-to: type=gha,scope=${{ matrix.image_name }},mode=max |