Update registry.yaml #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: Docker Compose Build | |
on: | |
push: | |
branches: [ dev ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Private Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ${{ secrets.DOCKER_REGISTRY }} | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Load .env file | |
run: | | |
sudo apt-get install -y dotenv | |
dotenv -f .env | |
- name: Build and push | |
env: | |
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }} | |
DOCKER_PROJECT: ${{ secrets.DOCKER_PROJECT }} | |
run: | | |
docker compose -f docker-compose.build.yaml build | |
docker compose -f docker-compose.build.yaml push |