Skip to content

Build and push to Docker #2

Build and push to Docker

Build and push to Docker #2

Workflow file for this run

env:
PUBLIC_API_URL: 'https://anyabi.xyz/api'
name: build-and-deploy-prod
on:
push:
branches:
- master
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set version tag
id: vars
run: echo "version=$(git log -1 --pretty=%h)" >> $GITHUB_OUTPUT
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: |
mark3labs/anyabi:${{ steps.vars.outputs.version }}
mark3labs/anyabi:latest