mirror of
https://github.com/ManiMatter/decluttarr.git
synced 2026-04-22 00:35:47 +02:00
48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
name: Deploy Images to GHCR
|
|
|
|
# env:
|
|
# DOTNET_VERSION: '6.0.x'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
push-decluttarr-image:
|
|
runs-on: ubuntu-latest
|
|
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
|
|
uses: anothrNick/github-tag-action@1.36.0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
WITH_V: true
|
|
|
|
- name: Extract Git Tag
|
|
run: echo "GIT_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
|
|
|
- name: 'Build Inventory Image'
|
|
env:
|
|
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
|
|
ECR_REPOSITORY: reponame
|
|
IMAGE_TAG: ${{ env.GIT_TAG }}
|
|
run: |
|
|
docker build -f docker/Dockerfile . -t ghcr.io/manimatter/decluttarr:$IMAGE_TAG
|
|
docker push ghcr.io/manimatter/decluttarr:latest |