Skip to content

v0.0.8

v0.0.8 #53

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
# Клонування репозиторію
- name: Checkout code
uses: actions/checkout@v3
# Завантаження .env
- name: Load .env file
run: |
set -a
source .env
echo "DOCKER_TAG=${DOCKER_TAG}" >> $GITHUB_ENV
- name: Verify DOCKER_TAG
run: |
echo "DOCKER_TAG=${DOCKER_TAG}"
# Логін у Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker Image
run: |
docker build -t "${{ secrets.DOCKERHUB_USERNAME }}/step-final-project:${DOCKER_TAG}" -f app/Dockerfile app/
# Завантаження Docker-образу
- name: Push Docker Image
run: |
docker push ${{ secrets.DOCKERHUB_USERNAME }}/step-final-project:${DOCKER_TAG}
# Лінтинг DEV та PROD YAML
- name: Lint Kubernetes YAML
run: |
yamllint -c .yamllint app/k8s/dev/deployment.yaml
yamllint -c .yamllint app/k8s/prod/deployment.yaml