mirror of
https://github.com/PokeAPI/pokeapi
synced 2024-11-22 03:13:06 +00:00
commit
5575d2476a
4 changed files with 14 additions and 8 deletions
|
@ -20,6 +20,9 @@ jobs:
|
||||||
- run:
|
- run:
|
||||||
name: Run tests
|
name: Run tests
|
||||||
command: make test
|
command: make test
|
||||||
|
- run:
|
||||||
|
name: Generate OpenAPI schema
|
||||||
|
command: make openapi-generate
|
||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/python:3.10.9
|
- image: cimg/python:3.10.9
|
||||||
|
|
2
.github/workflows/docker-build.yml
vendored
2
.github/workflows/docker-build.yml
vendored
|
@ -35,7 +35,7 @@ jobs:
|
||||||
context: .
|
context: .
|
||||||
file: ./Resources/docker/app/Dockerfile
|
file: ./Resources/docker/app/Dockerfile
|
||||||
push: false
|
push: false
|
||||||
platforms: local
|
platforms: local,linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
- name: Image digest
|
- name: Image digest
|
||||||
|
|
14
.github/workflows/docker-image.yml
vendored
14
.github/workflows/docker-image.yml
vendored
|
@ -13,24 +13,24 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v3
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
# list of Docker images to use as base name for tags
|
# list of Docker images to use as base name for tags
|
||||||
images: |
|
images: |
|
||||||
pokeapi/pokeapi
|
pokeapi/pokeapi
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v3
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v3
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME_NARAMSIM }}
|
username: ${{ secrets.DOCKERHUB_USERNAME_NARAMSIM }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN_NARAMSIM }}
|
password: ${{ secrets.DOCKERHUB_TOKEN_NARAMSIM }}
|
||||||
|
@ -43,12 +43,12 @@ jobs:
|
||||||
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
|
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Resources/docker/app/Dockerfile
|
file: ./Resources/docker/app/Dockerfile
|
||||||
push: true
|
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 }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
- name: Image digest
|
- name: Image digest
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -41,6 +41,9 @@ make-migrations: # Create migrations files if schema has changed
|
||||||
shell: # Load a shell
|
shell: # Load a shell
|
||||||
python manage.py shell ${local_config}
|
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-up: # (Docker) Create services/volumes/networks
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue