Skip to content

Commit

Permalink
Build and push to Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ezynda3 committed Sep 10, 2024
1 parent d8ecad1 commit 2825c13
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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

0 comments on commit 2825c13

Please sign in to comment.