Pin fly.toml to a stable image tag instead of passing via output
Multi-line outputs from docker/metadata-action break when passed
between jobs. A fixed tag in fly.toml sidesteps this.
Assisted-by: Claude Opus 4.6 via Claude Code
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2ddddfb..dc9b0a2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -23,8 +23,6 @@ jobs:
build:
needs: test
runs-on: ubuntu-latest
- outputs:
- image: ${{ steps.meta.outputs.tags }}
steps:
- uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
@@ -45,6 +43,7 @@ jobs:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value={{date 'YYYYMMDD'}}-${{ steps.short-sha.outputs.sha }}
+ type=raw,value=fly.io,enable=${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
- uses: docker/build-push-action@v6
with:
context: .
@@ -79,6 +78,6 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: superfly/flyctl-actions/setup-flyctl@master
- - run: flyctl deploy --image ${{ needs.build.outputs.image }}
+ - run: flyctl deploy
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
diff --git a/fly.toml b/fly.toml
index 5ca379d..cf942a3 100644
--- a/fly.toml
+++ b/fly.toml
@@ -7,6 +7,7 @@ app = 'ketchup-t1zvtw'
primary_region = 'sjc'
[build]
+ image = 'ghcr.io/kejadlen/ketchup:fly.io'
[http_service]
internal_port = 9292