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

ci: build dav image (#43) #1

ci: build dav image (#43)

ci: build dav image (#43) #1

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 }}