deluge/.github/workflows/docker.yml

50 lines
1.1 KiB
YAML
Raw Normal View History

2024-10-29 17:40:34 +00:00
name: Docker
on:
push:
branches:
- develop
- master
tags:
- 'v*.*.*'
workflow_dispatch:
env:
DOCKER_FILE: docker/deluge.Dockerfile
DOCKER_REPO: codexstorage/deluge
jobs:
docker:
runs-on: ubuntu-22.04
steps:
2024-10-29 20:42:30 +00:00
- name: Checkout
uses: actions/checkout@v4
2024-10-29 17:40:34 +00:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup Docker Metadata
2024-10-29 20:38:20 +00:00
id: meta
2024-10-29 17:40:34 +00:00
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_REPO }}
2024-10-29 20:07:34 +00:00
flavor: |
latest=true
tags: |
type=sha
2024-10-29 17:40:34 +00:00
- name: Build and Push
uses: docker/build-push-action@v6
with:
context: .
file: ${{ env.DOCKER_FILE }}
2024-10-29 20:07:34 +00:00
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}