update settings.py #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: customk deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
push_to_registry: | |
name: Push to ncp container registry | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Inject .env file | |
run: echo "${{ secrets.ENV_PROD }}" > ./.env | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to NCP Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ secrets.NCP_CONTAINER_REGISTRY }} | |
username: ${{ secrets.NCP_ACCESS_KEY }} | |
password: ${{ secrets.NCP_SECRET_KEY }} | |
- name: Build and push app image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: | | |
${{ secrets.NCP_CONTAINER_REGISTRY }}/customk-app:${{ github.run_number }} | |
${{ secrets.NCP_CONTAINER_REGISTRY }}/customk-app:latest | |
cache-from: type=registry,ref=${{ secrets.NCP_CONTAINER_REGISTRY }}/customk-app:latest | |
cache-to: type=inline | |
- name: Build and push nginx image | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./nginx | |
file: ./nginx/Dockerfile | |
push: true | |
tags: | | |
${{ secrets.NCP_CONTAINER_REGISTRY }}/customk-nginx:${{ github.run_number }} | |
${{ secrets.NCP_CONTAINER_REGISTRY }}/customk-nginx:latest | |
cache-from: type=registry,ref=${{ secrets.NCP_CONTAINER_REGISTRY }}/customk-nginx:latest | |
cache-to: type=inline |