Skip to content

feat: docker build and push to github registry on every push #1

feat: docker build and push to github registry on every push

feat: docker build and push to github registry on every push #1

name: docker build & push
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/arian8j2/wireguard-uptimekuma-reporter:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Delete old packages
uses: actions/delete-package-versions@v4
with:
package-name: uptime-reporter
package-type: container
min-versions-to-keep: 5