-
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@692973e3d937129bcbf40652eb9f2f61becf3332
- name: install cosign
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20
- 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 }}