Skip to content

Merge pull request #14 from mslfh/dev #1

Merge pull request #14 from mslfh/dev

Merge pull request #14 from mslfh/dev #1

name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version number
id: vars
run: echo "VERSION=$(git describe --tags --always)" >> $GITHUB_ENV
- name: Save state
run: echo "VERSION=$(git describe --tags --always)" >> $GITHUB_STATE
- name: Set output
run: echo "version=$(git describe --tags --always)" >> $GITHUB_OUTPUT
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}/exertime-image:latest