Skip to content

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
VovaStelmashchuk committed Feb 1, 2024
1 parent 3563c67 commit de847d9
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/prod_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Prod deploy

on:
push:
branches:
- 'main'
- 'add_docker'

jobs:
prod_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
- uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver
with:
current_version: ${{ steps.get-latest-tag.outputs.tag }}
level: patch
- uses: actions-ecosystem/action-push-tag@v1
with:
tag: ${{ steps.bump-semver.outputs.new_version }}
message: 'Release ${{ steps.bump-semver.outputs.new_version }}'
- name: "Set output"
id: set-output
run: echo "mix_drinks_frontend_version=${{ steps.bump-semver.outputs.new_version }}" >> $GITHUB_ENV
- name: "Print output mix drinks frontend version"
run: echo ${{ env.mix_drinks_frontend_version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/mixdrinks-web:${{env.mix_drinks_frontend_version}}
${{ secrets.DOCKERHUB_USERNAME }}/mixdrinks-web:latest

0 comments on commit de847d9

Please sign in to comment.