Skip to content

Commit

Permalink
change pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
George-Spanos committed Jul 14, 2023
1 parent b797a5f commit b6fd915
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Deploy Stack
name: Deploy to Flyio

on:
push:
branches:
- "main"
# tags:
# - "v*"
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-22.04
Expand All @@ -23,24 +21,18 @@ jobs:
uses: docker/build-push-action@v3
with:
push: true
tags: mobyit/catchemall:${{ github.sha }}
tags: mobyit/catchemall:${{ github.ref_name }}
deploy:
needs: build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Change docker stack tag
run: |
sed -i "s/\${TAG}/${{ github.sha }}/g" docker-stack.yml
- name: Deploy Stack
uses: kitconcept/[email protected]
- name: Log in to registry
uses: docker/login-action@v2
with:
remote_host: ${{ secrets.HOST }}
remote_user: ${{ secrets.USERNAME }}
remote_private_key: ${{ secrets.KEY }}
registry: "docker.io"
deploy_timeout: 180
username: ${{ secrets.CONTAINER_USERNAME }}
password: ${{ secrets.CONTAINER_PASSWORD }}
stack_file: "docker-stack.yml"
stack_name: "catchemall"
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only -i mobyit/catchemall:${{ github.ref_name }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

0 comments on commit b6fd915

Please sign in to comment.