Skip to content

realese change

realese change #41

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches:
- main
- dev
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
# Checkout des Codes
- name: Checkout code
uses: actions/checkout@v3
# Log in to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Set Docker Tag basierend auf dem Branch
- name: Set Docker Tag
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "IMAGE_TAG=latest" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == "refs/heads/dev" ]]; then
echo "IMAGE_TAG=dev" >> $GITHUB_ENV
fi
# Build Docker Image
- name: Build Docker Image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/brother_ql_app:${{ env.IMAGE_TAG }} .
# Push Docker Image to Docker Hub
- name: Push Docker Image
run: |
docker push ${{ secrets.DOCKER_USERNAME }}/brother_ql_app:${{ env.IMAGE_TAG }}