Skip to content

Commit

Permalink
Merge pull request #1076 from PokeAPI/revert-openapi
Browse files Browse the repository at this point in the history
CICD OpenAPI
  • Loading branch information
Naramsim authored May 6, 2024
2 parents b2ef3eb + b37cae4 commit 5575d24
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
- run:
name: Run tests
command: make test
- run:
name: Generate OpenAPI schema
command: make openapi-generate
build:
docker:
- image: cimg/python:3.10.9
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
context: .
file: ./Resources/docker/app/Dockerfile
push: false
platforms: local
platforms: local,linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Image digest
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
pokeapi/pokeapi
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME_NARAMSIM }}
password: ${{ secrets.DOCKERHUB_TOKEN_NARAMSIM }}
Expand All @@ -43,12 +43,12 @@ jobs:
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: ./Resources/docker/app/Dockerfile
push: true
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/arm/v7,linux/arm/v6
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Image digest
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ make-migrations: # Create migrations files if schema has changed
shell: # Load a shell
python manage.py shell ${local_config}

openapi-generate:
python manage.py spectacular --color --file openapi.yml ${local_config}

docker-up: # (Docker) Create services/volumes/networks
docker-compose up -d

Expand Down

0 comments on commit 5575d24

Please sign in to comment.