Skip to content

feat: add unauthenticated access (#6) #15

feat: add unauthenticated access (#6)

feat: add unauthenticated access (#6) #15

Workflow file for this run

name: Release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+" # 1.0.0
jobs:
push_image:
name: Push ${{ matrix.type }} image
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- type: unified
images: |
ghcr.io/musikid/chwitter
dockerfile: Dockerfile
- type: frontend
images: |
ghcr.io/musikid/chwitter-frontend
dockerfile: client/Dockerfile
- type: backend
images: |
ghcr.io/musikid/chwitter-backend
dockerfile: server/Dockerfile
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: ${{ matrix.images }}
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=tag
type=sha
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v4
with:
context: .
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
deploy:
name: Deploy app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}