Skip to content

Add nginx-proxy docs and GHCR publishing #1

Add nginx-proxy docs and GHCR publishing

Add nginx-proxy docs and GHCR publishing #1

Workflow file for this run

name: Publish GHCR Image
on:
push:
branches:
- main
tags:
- "v*"
paths:
- ".github/workflows/publish-ghcr.yml"
- "notify_push/**"
- "README.md"
- "README.pt-BR.md"
- "docker-compose.example.yml"
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Derive image name
id: image
shell: bash
run: echo "name=ghcr.io/${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ steps.image.outputs.name }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=tag
type=sha
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: ./notify_push
file: ./notify_push/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}