Skip to content

Commit

Permalink
Merge pull request #39
Browse files Browse the repository at this point in the history
merge refactor-abdfd971 with master
  • Loading branch information
sssomeshhh authored Dec 3, 2022
2 parents abdfd97 + a34ab29 commit 38c9dc2
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 168 deletions.
130 changes: 0 additions & 130 deletions .github/workflows/build-docker-image.yml

This file was deleted.

94 changes: 94 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: build-image

on: [push, workflow_dispatch]

jobs:
build-api:
runs-on: ubuntu-22.04
steps:
- name: Login to Docker Hub
uses: docker/[email protected]
with:
registry: docker.io
username: sssomeshhh
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Setup Docker Buildx
id: setup_buildx
uses: docker/[email protected]
- name: Build Load 'api'
id: docker_load_api
uses: docker/[email protected]
with:
builder: ${{ steps.setup_buildx.outputs.name }}
target: api
cache-from: |
type=registry,ref=sssomeshhh/cache:tgmb-api-master
type=registry,ref=sssomeshhh/cache:tgmb-api-${{ github.ref_name }}
cache-to: |
type=registry,ref=sssomeshhh/cache:tgmb-api-${{ github.ref_name }}
load: false
push: false

build-sdk:
runs-on: ubuntu-22.04
steps:
- name: Login to Docker Hub
uses: docker/[email protected]
with:
registry: docker.io
username: sssomeshhh
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Setup Docker Buildx
id: setup_buildx
uses: docker/[email protected]
- name: Build Load 'sdk'
id: docker_load_sdk
uses: docker/[email protected]
with:
builder: ${{ steps.setup_buildx.outputs.name }}
target: sdk
cache-from: |
type=registry,ref=sssomeshhh/cache:tgmb-sdk-master
type=registry,ref=sssomeshhh/cache:tgmb-sdk-${{ github.ref_name }}
cache-to: |
type=registry,ref=sssomeshhh/cache:tgmb-sdk-${{ github.ref_name }}
load: false
push: false

build-app:
runs-on: ubuntu-22.04
needs: [build-api, build-sdk]
steps:
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ksssomesh12
password: ${{ secrets.GH_PACKAGES_TOKEN }}
- name: Login to Docker Hub
uses: docker/[email protected]
with:
registry: docker.io
username: sssomeshhh
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Setup Docker Buildx
id: setup_buildx
uses: docker/[email protected]
- name: Build Push 'app'
id: docker_push_app
uses: docker/[email protected]
with:
builder: ${{ steps.setup_buildx.name }}
target: app
cache-from: |
type=registry,ref=sssomeshhh/cache:tgmb-api-${{ github.ref_name }}
type=registry,ref=sssomeshhh/cache:tgmb-sdk-${{ github.ref_name }}
type=registry,ref=sssomeshhh/cache:tgmb-app-master
type=registry,ref=sssomeshhh/cache:tgmb-app-${{ github.ref_name }}
cache-to: |
type=registry,ref=sssomeshhh/cache:tgmb-app-${{ github.ref_name }}
load: false
push: true
tags: |
ghcr.io/ksssomesh12/tgmb-beta:${{ github.sha }}
ghcr.io/ksssomesh12/tgmb-beta:${{ github.ref_name }}
6 changes: 2 additions & 4 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
create-release:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Create Release
id: create_release
Expand All @@ -21,21 +21,19 @@ jobs:
prerelease: false

deploy-package:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [create-release]
steps:
- name: Checkout Repo
id: checkout_repo
uses: actions/checkout@v3
with:
submodules: recursive

- name: Create Package
id: create_package
run: |
rm -rvf ./deploy/.git*
tar -cvf deploy.tar deploy
- name: Upload Package
id: upload_package
uses: softprops/action-gh-release@v1
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@ on:

jobs:
create-release:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Setup Python 3.9
id: setup_python
uses: actions/[email protected]
with:
python-version: 3.9

- name: Checkout Repo
id: checkout_repo
uses: actions/checkout@v3
with:
submodules: recursive

- name: Build Dist
id: build_dist
env:
Expand All @@ -30,7 +28,6 @@ jobs:
python3 -m pip install build --user
python3 -m build
ls -shl dist/
- name: Publish to PyPI
id: publish_pypi
uses: pypa/[email protected]
Expand Down
Loading

0 comments on commit 38c9dc2

Please sign in to comment.