Skip to content

Commit

Permalink
docker push to ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanthlogic committed Aug 14, 2023
1 parent b105ee9 commit 3874ee8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: CI/CD Pipeline
on:
workflow_dispatch:
push:
branches: [ "main" ]
paths: [ '!PostmanCollections/**' , '!./github/**' ]
branches: ["main"]
paths: ["!PostmanCollections/**", "!./github/**"]

jobs:
build_and_test:
Expand All @@ -29,7 +29,7 @@ jobs:

- name: Install Dependencies
run: npm ci

- name: Start Server
run: npm start & npx wait-on http://localhost:3000

Expand Down Expand Up @@ -61,20 +61,20 @@ jobs:
- name: Build and Push Docker Image
run: |
docker buildx create --use
docker buildx build --platform linux/amd64 -t ghcr.io/${{ github.repository }}:latest --push.
docker buildx build --platform linux/amd64 -t ghcr.io/${{ github.repository }}:latest --push .
docker buildx stop
deploy_to_fly:
needs: build_and_push_docker_image
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Get FlyCtl
uses: superfly/flyctl-actions/setup-flyctl@master

- name: start deployment
uses: bobheadxi/deployments@v1
id: deployment
Expand All @@ -83,7 +83,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
env: Fly

- name: Deploy to Fly
- name: Deploy to Fly
run: |
flyctl deploy --remote-only
env:
Expand All @@ -105,4 +105,4 @@ jobs:
path: ~/.fly
key: ${{ runner.os }}-flyctl
restore-keys: |
${{ runner.os }}-flyctl-
${{ runner.os }}-flyctl-

0 comments on commit 3874ee8

Please sign in to comment.