Add RUN chown 1000:1000 /src/ -R to end of Dockerfile #5
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: Create and publish the Docker image | |
on: | |
push: | |
branches: ['homol'] | |
env: | |
IMAGE_NAME: ghcr.io/institutoazmina/penhas-backend | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Login to Github Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./api/ | |
file: ./api/docker/Dockerfile | |
push: true | |
tags: ${{ env.IMAGE_NAME }}:latest,${{ env.IMAGE_NAME }}:${{ github.sha }} | |
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:latest | |
cache-to: type=inline |