Skip to content

Commit

Permalink
fix workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
dmdhrumilmistry committed Oct 28, 2023
1 parent 478c354 commit 85c7817
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev-push.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Dev Release: Build and Push Docker Image to DockerHub"
name: "Dev Release: Build and Push OWASP OFFAT Docker Images to DockerHub"

on:
push:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ jobs:
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
run: |
cd src
python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: src/dist
56 changes: 30 additions & 26 deletions .github/workflows/release-push.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: "Build and Push Docker Image to DockerHub"
name: "Release: Build and Push OWASP OFFAT Docker Images to DockerHub"

on:
release:
types: [published]

push:
branches:
- "dev"

jobs:
push-base-docker-image:
build-and-push-main-docker-images:
runs-on: ubuntu-latest
steps:
- name: Branch Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
Expand All @@ -18,33 +20,35 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: change cwd to src directory
run: cd src
- name: Build and push
- name: Build and push offat-base docker image
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64
context: ./src/
file: ./src/DockerFiles/base-Dockerfile
push: true
file: ./Dockerfiles/base-Dockerfile
tags: ${{ secrets.DOCKERHUB_USERNAME }}/offat-base:latest


push-cli-docker-image:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
platforms: linux/amd64,linux/arm64
- name: Build and push offat docker image
uses: docker/build-push-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
context: ./src/
file: ./src/DockerFiles/main/cli-Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/offat:latest
platforms: linux/amd64,linux/arm64
- name: Build and push offat-api docker image
uses: docker/build-push-action@v3
with:
context: ./src/
file: ./src/DockerFiles/main/backend-api-Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/offat-api:latest
platforms: linux/amd64,linux/arm64
- name: Build and push offat-api-worker docker image
uses: docker/build-push-action@v3
with:
context: ./src/
file: ./src/DockerFiles/main/backend-api-worker-Dockerfile
push: true
file: ./src/Dockerfiles/cli-Dockerfile
tags: ${{ secrets.DOCKERHUB_USERNAME }}/offat:latest
tags: ${{ secrets.DOCKERHUB_USERNAME }}/offat-api-worker:latest
platforms: linux/amd64,linux/arm64

0 comments on commit 85c7817

Please sign in to comment.