-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (57 loc) · 1.91 KB
/
Docker.yml
File metadata and controls
69 lines (57 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Build and Push Docker Image
on:
push:
branches:
- main
env:
DOCKER_FILE: SeerrFixarr.App/Dockerfile
IMAGE_NAME: ghcr.io/${{ github.repository }}
jobs:
build-and-push:
name: Build and Push Docker Image to GHCR
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Override IMAGE_NAME with lowercase version
run: |
echo "IMAGE_NAME=$(echo "$IMAGE_NAME" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get next version
uses: reecetech/version-increment@2024.10.1
id: version
with:
scheme: conventional_commits
increment: patch
- name: Build Docker image
uses: docker/build-push-action@v2
with:
push: true
tags: |
${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_NAME }}:${{ steps.version.outputs.prefixed-v-version }}
file: ${{ env.DOCKER_FILE }}
context: .
- name: Create Tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.version.outputs.prefixed-v-version }}
tag_prefix: ""
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.version.outputs.prefixed-v-version }}
name: Release ${{ steps.version.outputs.prefixed-v-version }}
generateReleaseNotes: true
prerelease: false