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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
- 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@7e6f77677b7892794c8852c6e3773c3e9bc3129a
with:
context: .
push: true
tags: ghcr.io/${{ steps.repository.outputs.lowercase }}:${{ steps.tags.outputs.lowercase }}