Skip to content

build(deps): bump docker/build-push-action from 3 to 5 (#90) #7

build(deps): bump docker/build-push-action from 3 to 5 (#90)

build(deps): bump docker/build-push-action from 3 to 5 (#90) #7

name: Publish Docker Image to GHCR
on:
push:
paths:
- 'Dockerfile'
- '.github/workflows/publish-docker-image.yml'
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/${{ github.repository_owner }}/yourip:latest
- name: Logout from GHCR
run: docker logout ghcr.io