Skip to content

Commit b1dc11a

Browse files
committed
fix(docker): set up workflow and update dockerfile
Signed-off-by: SphericalKat <amolele@gmail.com>
1 parent ebd9f7f commit b1dc11a

File tree

2 files changed

+40
-11
lines changed

2 files changed

+40
-11
lines changed

.github/workflows/fly.yml

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,41 @@
1-
name: Fly Deploy
2-
on: [push]
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches: [ develop ]
6+
37
env:
4-
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}
10+
511
jobs:
6-
deploy:
7-
name: Deploy to fly.io
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/checkout@v3
11-
- uses: superfly/flyctl-actions/setup-flyctl@master
12-
- run: flyctl deploy --remote-only
12+
build-and-push:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Log in to the Container registry
23+
uses: docker/login-action@v3
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Extract metadata (tags, labels) for Docker
30+
id: meta
31+
uses: docker/metadata-action@v5
32+
with:
33+
images: ghcr.io/SphericalKat/katbin
34+
35+
- name: Build and push Docker image
36+
uses: docker/build-push-action@v5
37+
with:
38+
context: .
39+
push: true
40+
tags: ${{ steps.meta.outputs.tags }}
41+
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM elixir:alpine AS build
1+
FROM elixir:1.16-otp-24-alpine AS build
22

33
# install build dependencies
44
RUN apk add --no-cache build-base npm git curl py-pip rust cargo

0 commit comments

Comments
 (0)