Skip to content

Commit

Permalink
chore(ci): moving to gitflow release
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed Feb 9, 2024
1 parent 6cf8632 commit 1f86a99
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 52 deletions.
24 changes: 1 addition & 23 deletions .github/workflows/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,33 +92,11 @@ jobs:
- name: Deploy to stage
run: ~/.fly/bin/fly deploy --config fly.api.toml --dockerfile ./apps/api/Dockerfile --app keyshade-api-stage --access-token ${{ secrets.FLY_ACCESS_TOKEN }}

build-api-alpha:
needs: validate
runs-on: ubuntu-latest
name: Build and push API docker image for alpha
if: ${{ startsWith(github.ref , 'refs/tags/') && contains(github.ref, 'alpha') }}

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

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build Docker image
run: docker build -t keyshade/keyshade-api:${{ github.ref_name }} keyshade/keyshade-api:alpha-latest -f ./apps/api/Dockerfile .

- name: Push Docker image
run: docker push keyshade/keyshade-api

build-api-release:
needs: validate
runs-on: ubuntu-latest
name: Build and push API docker image for release
if: ${{ startsWith(github.ref , 'refs/tags/') && !contains(github.ref, 'alpha') }}
if: ${{ startsWith(github.ref , 'refs/tags/')}}

steps:
- name: Checkout
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- alpha

jobs:
release:
Expand Down
24 changes: 1 addition & 23 deletions .github/workflows/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,33 +73,11 @@ jobs:
- name: Deploy to stage
run: ~/.fly/bin/fly deploy --config fly.web.toml --dockerfile ./apps/web/Dockerfile --app keyshade-web --access-token ${{ secrets.FLY_ACCESS_TOKEN }}

build-web-alpha:
needs: validate
runs-on: ubuntu-latest
name: Build and push Web docker image for alpha
if: ${{ startsWith(github.ref , 'refs/tags/') && contains(github.ref, 'alpha') }}

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

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build Docker image
run: docker build -t keyshade/keyshade-web:${{ github.ref_name }} keyshade/keyshade-web:alpha-latest -f ./apps/web/Dockerfile .

- name: Push Docker image
run: docker push keyshade/keyshade-web

build-web-release:
needs: validate
runs-on: ubuntu-latest
name: Build and push Web docker image for release
if: ${{ startsWith(github.ref , 'refs/tags/') && !contains(github.ref, 'alpha') }}
if: ${{ startsWith(github.ref , 'refs/tags/') }}

steps:
- name: Checkout
Expand Down
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
"private": true,
"release": {
"branches": [
"main",
{
"name": "alpha",
"prerelease": true
}
"main"
],
"plugins": [
[
Expand Down

0 comments on commit 1f86a99

Please sign in to comment.