mirror of
https://github.com/ManiMatter/decluttarr.git
synced 2026-04-20 05:54:17 +02:00
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
name: Deploy Images to GHCR
|
|
|
|
# env:
|
|
# DOTNET_VERSION: '6.0.x'
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
tags: ["v[0-9]+.[0-9]+.[0-9]*"]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
new_tag: ${{ steps.setversion.outputs.new_tag }}
|
|
defaults:
|
|
run:
|
|
working-directory: '.'
|
|
steps:
|
|
- name: 'Checkout GitHub Action'
|
|
uses: actions/checkout@main
|
|
|
|
- name: 'Login to GitHub Container Registry'
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{github.actor}}
|
|
password: ${{secrets.GITHUB_TOKEN}}
|
|
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: '0'
|
|
|
|
- name: Bump version and push tag
|
|
id: setversion
|
|
uses: anothrNick/github-tag-action@1.36.0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
WITH_V: true
|
|
|
|
- name: "Build, Tag, and push the Docker image"
|
|
env:
|
|
IMAGE_NAME: ghcr.io/manimatter/decluttarr
|
|
IMAGE_TAG: ${{ steps.build.outputs.new_tag }}
|
|
run: |
|
|
docker build -f docker/Dockerfile -t $IMAGE_NAME:$IMAGE_TAG .
|
|
docker push $IMAGE_NAME:$IMAGE_TAG
|
|
|