Skip to content

Update dependency ryanoasis/nerd-fonts to v3.5.1 (#158) #114

Update dependency ryanoasis/nerd-fonts to v3.5.1 (#158)

Update dependency ryanoasis/nerd-fonts to v3.5.1 (#158) #114

Workflow file for this run

name: Publish Docker Image
on:
push:
branches:
- main
release:
types:
- published
workflow_dispatch:
inputs:
tag_name:
description: Docker image tag to publish
required: true
type: string
permissions:
contents: read
packages: write
concurrency:
group: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && format('{0}-main-edge', github.workflow) || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
REGISTRY: ghcr.io
IMAGE_NAME: snuffy2/shellport
jobs:
publish:
if: github.event.repository.fork == false
name: Build and publish Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v7
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=edge,branch=main,enable=${{ github.event_name == 'push' }}
type=semver,pattern={{version}},value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }}
type=raw,value=latest,enable=${{ github.event_name == 'release' && !github.event.release.prerelease }}
type=raw,value=${{ inputs.tag_name }},enable=${{ github.event_name == 'workflow_dispatch' }}
labels: |
org.opencontainers.image.source=https://github.com/Snuffy2/shellport/archive/${{ github.sha }}.tar.gz
- name: Build and publish Docker image
uses: docker/build-push-action@v7
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
SHELLPORT_VERSION=${{ github.event_name == 'release' && github.event.release.tag_name || github.event_name == 'workflow_dispatch' && inputs.tag_name || 'edge' }}
SHELLPORT_SOURCE_URL=https://github.com/Snuffy2/shellport/archive/${{ github.sha }}.tar.gz
cache-from: type=gha
cache-to: type=gha,mode=max