Skip to content

Commit

Permalink
Move to Azure and Unit
Browse files Browse the repository at this point in the history
  • Loading branch information
meezaan committed Jun 7, 2023
1 parent 4f7b9d5 commit 6e3dd85
Show file tree
Hide file tree
Showing 9 changed files with 135 additions and 523 deletions.
188 changes: 0 additions & 188 deletions .circleci/config.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Test, Docker Build and Push
on:
push:
tags:
- "*"
jobs:
docker-build-and-push:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Actions Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Build and push to Docker Hub
uses: docker/build-push-action@v2
with:
push: true
tags: |
islamicnetwork/alquran.cloud:latest
islamicnetwork/alquran.cloud:${{ github.ref_name }}
ghcr.io/islamic-network/alquran.cloud:latest
ghcr.io/islamic-network/alquran.cloud:${{ github.ref_name }}
deploy-dubai:
needs: docker-build-and-push
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Env Substring
run: sudo apt-get update && sudo apt-get -y install gettext-base
- name: Install Kubectl
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod u+x ./kubectl
- name: Deploy
run: |
curl -o ./.k8s/deploy.sh https://raw.githubusercontent.com/islamic-network/k8s-deployment/master/deploy.sh
chmod u+x ./.k8s/deploy.sh
export REF_NAME=${{ github.ref_name }}
export K8S_URL=${{ secrets.K8S_DUBAI_URL }}
export K8S_TOKEN=${{ secrets.K8S_DUBAI_TOKEN }}
export K8S_CA=${{ secrets.K8S_DUBAI_CA }}
sh ./.k8s/deploy.sh
29 changes: 29 additions & 0 deletions .github/workflows/git-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test, Build and Tag
on:
push:
branches:
- "master"
workflow_dispatch:
branches:
- "master"
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Create Tag Name
id: vars
run: echo ::set-output name=TAGNAME::$(date +"%Y-%m-%d-%H-%M")
- name: Checkout code
uses: actions/checkout@v2
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GHA_TOKEN }}
with:
tag_name: ${{ steps.vars.outputs.TAGNAME }}
release_name: Release ${{ steps.vars.outputs.TAGNAME }}
body: |
Automated release from Pipeline
draft: false
prerelease: false
Loading

0 comments on commit 6e3dd85

Please sign in to comment.