Skip to content

Commit

Permalink
Build all pushes
Browse files Browse the repository at this point in the history
  • Loading branch information
mraerino committed Apr 28, 2024
1 parent b792eef commit 7774d9b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 56 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and publish Container Image

on:
push:
branches: ["main"]
workflow_dispatch:

env:
REGISTRY: ghcr.io
Expand All @@ -15,7 +15,7 @@ jobs:
contents: read
packages: write
outputs:
imageTag: ${{ steps.meta.outputs.tags }}
deployImage: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -42,6 +42,11 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=branch
type=ref,event=pr
- name: Build and push Docker image
uses: docker/build-push-action@v5
Expand All @@ -59,9 +64,10 @@ jobs:
runs-on: ubuntu-latest
concurrency: deploy-group # ensure only one action runs at a time
needs: build-and-push-image
if: github.event == 'push' && github.ref == 'refs/head/main'
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@1.5
- run: flyctl deploy --image ${{ needs.build-and-push-image.outputs.imageTag }}
- run: flyctl deploy --image ${{ needs.build-and-push-image.outputs.deployImage }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_DEPLOY_TOKEN }}
53 changes: 0 additions & 53 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit 7774d9b

Please sign in to comment.