Skip to content

Commit

Permalink
Merge pull request #8 from PSNAppz/1.0
Browse files Browse the repository at this point in the history
Workflow updates
  • Loading branch information
venky-ganapathy authored Dec 9, 2024
2 parents 6dd4642 + 94d884d commit 4d17636
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 77 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/beat-producers-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,38 +27,3 @@ jobs:
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: ./openg2p-sr-celery-beat-producers/dist/

docker-build-for-tag:
name: Docker Build and Push For Beat Producers Tag
needs: publish-to-pypi
runs-on: ubuntu-latest
env:
NAMESPACE: ${{ secrets.docker_hub_organisation || 'openg2p' }}
SERVICE_NAME: openg2p-sr-celery-beat-producers
steps:
- uses: actions/checkout@v3
- name: Docker build
run: |
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
IMAGE_ID=$NAMESPACE/$SERVICE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
VERSION=$TAG_NAME
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
echo VERSION=$VERSION >> $GITHUB_ENV
docker build ./openg2p-sr-celery-beat-producers -f ./openg2p-sr-celery-beat-producers/Dockerfile-pypi \
--tag $IMAGE_ID:$VERSION
if [[ '${{ secrets.docker_hub_token }}' != '' && '${{ secrets.docker_hub_actor }}' != '' ]]; then
export DOCKER_PUSH="true"
echo DOCKER_PUSH=$DOCKER_PUSH >> $GITHUB_ENV
fi
- name: Docker push
if: env.DOCKER_PUSH == 'true'
run: |
echo "${{ secrets.docker_hub_token }}" | docker login -u ${{ secrets.docker_hub_actor }} --password-stdin
docker push ${{ env.IMAGE_ID }}:${{ env.VERSION }}
36 changes: 0 additions & 36 deletions .github/workflows/workers-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,39 +27,3 @@ jobs:
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: ./openg2p-sr-celery-workers/dist/


docker-build-for-tag:
name: Docker Build and Push For Workers Tag
needs: publish-to-pypi
runs-on: ubuntu-latest
env:
NAMESPACE: ${{ secrets.docker_hub_organisation || 'openg2p' }}
SERVICE_NAME: openg2p-sr-celery-workers
steps:
- uses: actions/checkout@v3
- name: Docker build
run: |
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
IMAGE_ID=$NAMESPACE/$SERVICE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
VERSION=$TAG_NAME
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
echo VERSION=$VERSION >> $GITHUB_ENV
docker build ./openg2p-sr-celery-workers -f ./openg2p-sr-celery-workers/Dockerfile-pypi \
--tag $IMAGE_ID:$VERSION
if [[ '${{ secrets.docker_hub_token }}' != '' && '${{ secrets.docker_hub_actor }}' != '' ]]; then
export DOCKER_PUSH="true"
echo DOCKER_PUSH=$DOCKER_PUSH >> $GITHUB_ENV
fi
- name: Docker push
if: env.DOCKER_PUSH == 'true'
run: |
echo "${{ secrets.docker_hub_token }}" | docker login -u ${{ secrets.docker_hub_actor }} --password-stdin
docker push ${{ env.IMAGE_ID }}:${{ env.VERSION }}
6 changes: 3 additions & 3 deletions openg2p-sr-celery-beat-producers/Dockerfile-git
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ ADD --chown=${container_user}:${container_user_group} main.py /app
RUN python3 -m venv venv \
&& . ./venv/bin/activate
RUN python3 -m pip install \
git+https://github.com/openg2p/openg2p-fastapi-common@1.1.0\#subdirectory=openg2p-fastapi-common \
git+https://github.com/openg2p/openg2p-fastapi-common@1.1.0\#subdirectory=openg2p-fastapi-auth \
git+https://github.com/OpenG2P/[email protected]\#subdirectory=openg2p-sr-models \
git+https://github.com/openg2p/openg2p-fastapi-common@v1.1.1\#subdirectory=openg2p-fastapi-common \
git+https://github.com/openg2p/openg2p-fastapi-common@v1.1.1\#subdirectory=openg2p-fastapi-auth \
git+https://github.com/OpenG2P/[email protected].0\#subdirectory=openg2p-sr-models \
./src

USER ${container_user}
Expand Down
6 changes: 3 additions & 3 deletions openg2p-sr-celery-workers/Dockerfile-git
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ ADD --chown=${container_user}:${container_user_group} main.py /app
RUN python3 -m venv venv \
&& . ./venv/bin/activate
RUN python3 -m pip install \
git+https://github.com/openg2p/openg2p-fastapi-common@1.1.0\#subdirectory=openg2p-fastapi-common \
git+https://github.com/openg2p/openg2p-fastapi-common@1.1.0\#subdirectory=openg2p-fastapi-auth \
git+https://github.com/OpenG2P/[email protected]\#subdirectory=openg2p-sr-models \
git+https://github.com/openg2p/openg2p-fastapi-common@v1.1.1\#subdirectory=openg2p-fastapi-common \
git+https://github.com/openg2p/openg2p-fastapi-common@v1.1.1\#subdirectory=openg2p-fastapi-auth \
git+https://github.com/OpenG2P/[email protected].0\#subdirectory=openg2p-sr-models \
./src

USER ${container_user}
Expand Down

0 comments on commit 4d17636

Please sign in to comment.