🔀 merge: update Docker configurations for development environment, mo… #3
Workflow file for this run
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: Build and Push Docker Image | |
on: | |
push: | |
tags: | |
- 'v*' # Trigger on all tags | |
workflow_dispatch: # Allows manual triggering of the workflow | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Check out the repository | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Step 2: Log in to GitHub Container Registry | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# Step 3: Build the Docker image | |
- name: Build Docker Image | |
run: | | |
touch .env | |
docker compose build aymurai-api-full | |
docker tag ghcr.io/aymurai/api:full ghcr.io/aymurai/api:full-${{ github.ref_name }} | |
docker tag ghcr.io/aymurai/api:latest ghcr.io/aymurai/api:${{ github.ref_name }} | |
# Step 4: Push the Docker image to GHCR | |
- name: Push Docker Image | |
run: | | |
docker push ghcr.io/aymurai/api:full-${{ github.ref_name }} | |
docker push ghcr.io/aymurai/api:${{ github.ref_name }} | |
docker push ghcr.io/aymurai/api:latest | |
docker push ghcr.io/aymurai/api:full |