-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.15 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Release
on:
release:
types: [published]
jobs:
docker-release:
runs-on: ubuntu-latest
steps:
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Write dockerfile for release
run: |
echo "FROM ghcr.io/${{ github.repository }}:${{ github.sha }}" >Dockerfile
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: linux/amd64
tags: |
ghcr.io/${{ github.repository }}:${{ github.event.release.name }}
ghcr.io/${{ github.repository }}:latest
fly-release:
runs-on: ubuntu-latest
needs:
- docker-release
strategy:
matrix:
app:
- vellum
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only -a ${{ matrix.app }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}