Skip to content
This repository has been archived by the owner on Sep 14, 2024. It is now read-only.

Merge pull request #363 from MixDrinks/update_image_url #306

Merge pull request #363 from MixDrinks/update_image_url

Merge pull request #363 from MixDrinks/update_image_url #306

Workflow file for this run

name: Prod deploy
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_backend_version=${{ steps.bump-semver.outputs.new_version }}" >> $GITHUB_ENV
- name: "Print output mix drinks backend version"
run: echo ${{ env.mix_drinks_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
build-args: |
MIX_DRINKS_APP_VERSION=${{env.mix_drinks_backend_version}}
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/mixdrinks:${{env.mix_drinks_backend_version}}
${{ secrets.DOCKERHUB_USERNAME }}/mixdrinks:latest