Skip to content

Merge branch 'main' of https://github.com/MixDrinks/backend-node #4

Merge branch 'main' of https://github.com/MixDrinks/backend-node

Merge branch 'main' of https://github.com/MixDrinks/backend-node #4

name: Create release
on:
push:
branches:
- 'main'
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_node_backend_version=${{ steps.bump-semver.outputs.new_version }}" >> $GITHUB_ENV
- name: "Print output mix drinks node backend version"
run: echo ${{ env.mix_drinks_node-backend_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-node-backend:${{env.mix_drinks_node_backend_version}}
${{ secrets.DOCKERHUB_USERNAME }}/mixdrinks-node-backend:latest