Release #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
env: | |
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7 | |
on: | |
release: | |
types: [ created ] | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
with: | |
driver-opts: network=host | |
driver: docker-container | |
- name: Convert repo-name to lowercase | |
run: | | |
echo "REPOSITORY=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV | |
- name: Log into registry GHCR | |
if: success() | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish to ghcr.io | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: ${{ env.platforms }} | |
push: true | |
tags: ghcr.io/${{ env.REPOSITORY }}:latest |