Skip to content

Remove fly io variables #15

Remove fly io variables

Remove fly io variables #15

Workflow file for this run

name: CI
on:
push:
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
test:
name: Test app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: '26.2.1'
elixir-version: '1.16.0'
- name: Install Dependencies
run: mix deps.get
- name: Check Formatting
run: mix format --check-formatted
- name: Run Tests
run: mix test
build:
name: Build and push image to ghcr
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
deploy:
if: github.ref == 'refs/heads/main'
name: Deploy app
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only