This commit is contained in:
Benjamin Harder
2023-10-01 11:42:38 +02:00
parent 671b61a447
commit 904fc62bee

View File

@@ -9,37 +9,40 @@ on:
tags: ["v[0-9]+.[0-9]+.[0-9]*"]
jobs:
push-decluttarr-image:
runs-on: ubuntu-latest
defaults:
run:
working-directory: '.'
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@main
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}}
- 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
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: "Build, Tag, and push the Docker image"
env:
IMAGE_NAME: ghcr.io/manimatter/decluttarr
IMAGE_TAG: ${{ steps.setversion.new_tag }}
run: |
docker build -f docker/Dockerfile -t $IMAGE_NAME:$IMAGE_TAG .
docker push $IMAGE_NAME:$IMAGE_TAG
- 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