add missing block's logos #598
This file contains 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: Web Release | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "apps/web-remix/**" | |
release: | |
types: [published] | |
defaults: | |
run: | |
working-directory: apps/web-remix | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 8.15.3 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "21.6.2" | |
cache: "pnpm" | |
cache-dependency-path: apps/web-remix/pnpm-lock.yaml | |
- run: pnpm install | |
- run: pnpm lint | |
- run: pnpm test | |
- run: pnpm build | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
if: ${{ github.event_name == 'push' }} | |
- run: flyctl deploy --remote-only | |
env: | |
FLY_API_TOKEN: ${{ secrets.BUILDEL_WEB__FLY_API_TOKEN }} | |
if: ${{ github.event_name == 'push' }} | |
docker: | |
name: Docker | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to GitHub Container Registry | |
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Set up tags | |
id: set-tags | |
run: | | |
if [ "${{ github.event_name }}" == "push" ]; then | |
echo "tags=ghcr.io/${{ github.repository }}/web-remix:${{ github.sha }},ghcr.io/${{ github.repository }}/web-remix:alpha" >> $GITHUB_ENV | |
fi | |
if [ "${{ github.event_name }}" == "release" ]; then | |
is_latest=$(gh api repos/${{ github.repository }}/releases/latest | jq -r '.tag_name == "${{ github.event.release.tag_name }}"') | |
if [ "$is_latest" == "true" ]; then | |
echo "tags=ghcr.io/${{ github.repository }}/web-remix:${{ github.sha }},ghcr.io/${{ github.repository }}/web-remix:${{ github.event.release.tag_name }},ghcr.io/${{ github.repository }}/web-remix:latest" >> $GITHUB_ENV | |
else | |
echo "tags=ghcr.io/${{ github.repository }}/web-remix:${{ github.sha }},ghcr.io/${{ github.repository }}/web-remix:${{ github.event.release.tag_name }}" >> $GITHUB_ENV | |
fi | |
fi | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v3 | |
with: | |
context: apps/web-remix | |
tags: ${{ env.tags }} | |
push: ${{ github.event_name == 'push' || github.event_name == 'release' }} | |
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/web-remix:alpha-cache | |
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/web-remix:alpha-cache,mode=max |