Skip to content

Update Dockerfile-prod #1

Update Dockerfile-prod

Update Dockerfile-prod #1

Workflow file for this run

name: Build and Push Docker Image
on:
push:
tags:
- 'v*'
env:
CONTAINER_NAME: zelara-worker # Define the container name as an environment variable
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract tag name
id: extract_tag
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile-prod
push: true
tags: ghcr.io/${{ github.repository_owner }}/${{ env.CONTAINER_NAME }}:${{ env.TAG_NAME }}