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

Merge pull request #60 from esune/chore/update-readme #6

Merge pull request #60 from esune/chore/update-readme

Merge pull request #60 from esune/chore/update-readme #6

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get short SHA
id: vars
run: echo "::set-output name=sha_short::$(echo $GITHUB_SHA | cut -c1-7)"
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: docker/dav-controller/Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}/dav-controller:latest
ghcr.io/${{ github.repository }}/dav-controller:${{ steps.vars.outputs.sha_short }}