Skip to content

Commit

Permalink
Merge pull request #3 from Bubhux/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Bubhux authored Jan 17, 2025
2 parents b5ff4c3 + e96d2c6 commit a5409b9
Showing 1 changed file with 2 additions and 39 deletions.
41 changes: 2 additions & 39 deletions .github/workflows/ci_cd_branch_master.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Django CI/CD Master
name: OC Lettings apps CI/CD Master

on:
push:
Expand All @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7"]
python-version: ["3.10"]

steps:
- name: Checkout code
Expand Down Expand Up @@ -69,40 +69,3 @@ jobs:
docker buildx build --load --file Dockerfile --tag bubhux/bubhux-oc-image-build:${{ github.sha }} --tag bubhux/bubhux-oc-image-build:latest .
docker push bubhux/bubhux-oc-image-build:${{ github.sha }}
docker push bubhux/bubhux-oc-image-build:latest
- name: Set IMAGE_ID environment variable
run: |
IMAGE_ID=$(docker inspect --format='{{.Id}}' bubhux/bubhux-oc-image-build:${{ github.sha }})
echo "IMAGE_ID=$IMAGE_ID" >> $GITHUB_ENV
- name: Tag Docker image with commit hash
run: |
docker tag bubhux/bubhux-oc-image-build:${{ github.sha }} bubhux/bubhux-oc-image-build:commit-${{ github.sha }}
deploy_to_heroku:
needs: build_and_push_to_dockerhub
runs-on: ubuntu-latest

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

- name: Install Heroku CLI
run: curl https://cli-assets.heroku.com/install.sh | sh

- name: Purge Heroku cache
run: |
heroku plugins:install heroku-repo
heroku repo:purge_cache -a ${{ secrets.HEROKU_APP_NAME }}
- name: Log in to Heroku Container Registry
run: heroku container:login
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}

- name: Push to Heroku Container Registry
run: heroku container:push -a ${{ secrets.HEROKU_APP_NAME }} web

- name: Deploy to Heroku
run: |
HEROKU_DEBUG=1 heroku container:release -a ${{ secrets.HEROKU_APP_NAME }} web

0 comments on commit a5409b9

Please sign in to comment.