-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (38 loc) · 1.16 KB
/
deploy.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
42
---
name: flyio deploy
"on":
workflow_dispatch:
push:
branches:
- flyio
permissions:
contents: read
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
deploy:
name: flyio deploy
runs-on: ubuntu-latest
environment:
name: flyio
url: https://rwalk.fly.dev
steps:
- name: checkout project
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: install cosign
uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4
- name: verify rwalk image
run: |
cosign verify \
--certificate-identity \
'https://github.com/andros21/rwalk/.github/workflows/build.yml@refs/heads/master' \
--certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
"${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" | jq .
- name: flyio setup
uses: superfly/flyctl-actions/setup-flyctl@master
- name: flyio deploy
run: |
flyctl deploy --image ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}