chore: remove fly deploy actions (no longer used) (#161)
This commit is contained in:
parent
a14899521c
commit
e9edb235af
|
|
@ -1,61 +0,0 @@
|
|||
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
|
||||
|
||||
name: Fly Deploy (Production Environment)
|
||||
permissions:
|
||||
contents: read
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Version to deploy (without v prefix)"
|
||||
required: true
|
||||
type: string
|
||||
default: 'manual'
|
||||
|
||||
jobs:
|
||||
deploy-honcho-prod-image:
|
||||
name: Deploy Honcho Image (Production Environment)
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
group: deploy-prod-group
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: superfly/flyctl-actions/setup-flyctl@1.5
|
||||
- run: |
|
||||
# Determine the image label based on trigger type
|
||||
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||
IMAGE_LABEL="deployment-${{ github.event.inputs.version }}"
|
||||
else
|
||||
IMAGE_LABEL="deployment-${{ github.ref_name }}"
|
||||
fi
|
||||
flyctl deploy -a honcho-prod-image --remote-only --build-only --push --no-cache --image-label "$IMAGE_LABEL"
|
||||
env:
|
||||
FLY_API_TOKEN: ${{ secrets.FLY_PROD_API_TOKEN }}
|
||||
|
||||
prompt-service:
|
||||
name: Push to Service (Production Environment)
|
||||
needs: deploy-honcho-prod-image
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Send POST request
|
||||
env:
|
||||
GITHUB_REF_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
# Determine version and image label based on trigger type
|
||||
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||
TAG="${{ github.event.inputs.version }}"
|
||||
IMAGE_LABEL="honcho-prod-image:deployment-${{ github.event.inputs.version }}"
|
||||
else
|
||||
TAG=${GITHUB_REF_NAME#v}
|
||||
IMAGE_LABEL="honcho-prod-image:deployment-${GITHUB_REF_NAME}"
|
||||
fi
|
||||
|
||||
curl --fail -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer ${{ secrets.PROD_ENV_WEBHOOK_SECRET }}" \
|
||||
-d "{\"version\":\"$TAG\",\"image_label\":\"$IMAGE_LABEL\"}" \
|
||||
"${{ secrets.PROD_ENV_URL }}/webhooks/v1/add_honcho_version"
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
|
||||
|
||||
name: Fly Deploy (Test Environment)
|
||||
permissions:
|
||||
contents: read
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Version to deploy (without v prefix)"
|
||||
required: true
|
||||
type: string
|
||||
default: 'manual'
|
||||
|
||||
jobs:
|
||||
deploy-honcho-image:
|
||||
name: Deploy Honcho Image (Test Environment)
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
group: deploy-test-group
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: superfly/flyctl-actions/setup-flyctl@1.5
|
||||
- run: |
|
||||
# Determine the image label based on trigger type
|
||||
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||
IMAGE_LABEL="deployment-${{ github.event.inputs.version }}"
|
||||
else
|
||||
IMAGE_LABEL="deployment-${{ github.ref_name }}"
|
||||
fi
|
||||
flyctl deploy -a honcho-image --remote-only --build-only --push --no-cache --image-label "$IMAGE_LABEL"
|
||||
env:
|
||||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
||||
|
||||
prompt-service:
|
||||
name: Push to Service (Test Environment)
|
||||
runs-on: ubuntu-latest
|
||||
needs: deploy-honcho-image
|
||||
steps:
|
||||
- name: Send POST request
|
||||
env:
|
||||
GITHUB_REF_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
# Determine version and image label based on trigger type
|
||||
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||
TAG="${{ github.event.inputs.version }}"
|
||||
IMAGE_LABEL="honcho-image:deployment-${{ github.event.inputs.version }}"
|
||||
else
|
||||
TAG=${GITHUB_REF_NAME#v}
|
||||
IMAGE_LABEL="honcho-image:deployment-${GITHUB_REF_NAME}"
|
||||
fi
|
||||
|
||||
curl --fail -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer ${{ secrets.TEST_ENV_WEBHOOK_SECRET }}" \
|
||||
-d "{\"version\":\"$TAG\",\"image_label\":\"$IMAGE_LABEL\"}" \
|
||||
"${{ secrets.TEST_ENV_URL }}/webhooks/v1/add_honcho_version"
|
||||
Loading…
Reference in New Issue