s3-recent-file-cleaner/.github/workflows/ci.yml

40 lines
994 B
YAML
Raw Permalink Normal View History

2024-12-28 21:09:18 +11:00
name: Publish
on:
push:
branches:
- main
workflow_dispatch:
jobs:
publish:
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
name: Publish Docker Container
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Docker Metadata
id: meta
uses: docker/metadata-action@v4
with:
images: liamsgit.dev/LiamPietralla/s3-recent-file-cleaner
tags: |
type=raw,value=latest
- name: Login to Registry
uses: docker/login-action@v3
with:
registry: liamsgit.dev
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and Push Docker Image to Registry
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: Dockerfile