Skip to content

Commit

Permalink
add build deploy to github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mantesso committed Jun 14, 2024
1 parent 558c895 commit 4db95a4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 15 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: odin-battleship-fly
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Login to docker hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build the image and push it to Docker Hub
uses: docker/build-push-action@v5
with:
push: true
tags: mantesso/odin-battleship:ex_3.2

deploy:
needs: build
name: odin-battleship-fly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}


15 changes: 0 additions & 15 deletions .github/workflows/fly.yml

This file was deleted.

0 comments on commit 4db95a4

Please sign in to comment.