Skip to content

Workflow file for this run

name: Build and Push Docker Image
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@8459bc0c7e3759cdf591f513d9f141a95fef0a8f
- name: Lowercase repository
id: repository
uses: ASzc/change-string-case-action@ccb130a4e483d3e86287289183704dc9bf53e77e
with:
string: ${{ github.repository }}
- name: Create Tags
id: tags
uses: ASzc/change-string-case-action@ccb130a4e483d3e86287289183704dc9bf53e77e
with:
string: ${{ github.event_name == 'release' && 'latest' || github.ref_name }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@5f4866a30a54f16a52d2ecb4a3898e9e424939cf
if: ${{ github.event_name != 'pull_request' }}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@eb539f44b153603ccbfbd98e2ab9d4d0dcaf23a4
with:
context: .
push: true
tags: ghcr.io/${{ steps.repository.outputs.lowercase }}:${{ steps.tags.outputs.lowercase }}