Skip to content
This repository was archived by the owner on Jan 12, 2025. It is now read-only.

Commit 0278d55

Browse files
committed
ci: Implement changes learned from ServerPackCreator CI/CD-Pipeline
1 parent c4541f7 commit 0278d55

File tree

3 files changed

+42
-67
lines changed

3 files changed

+42
-67
lines changed

.github/workflows/ci-publish-latest.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/ci-publish-tag.yml

Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,58 @@
11
name: ci-publish-tag
22

33
on:
4-
push:
5-
tags:
6-
- '*.*'
4+
workflow_dispatch:
75

86
jobs:
97
multi-registries:
108
runs-on: ubuntu-latest
119
steps:
12-
-
13-
name: Checkout
10+
# SETUP ENVIRONMENT
11+
- name: Checkout
1412
uses: actions/checkout@v2
15-
-
16-
name: Set up QEMU
13+
- name: Set up QEMU
1714
uses: docker/setup-qemu-action@v1
18-
-
19-
name: Set up Docker Buildx
15+
- name: Set up Docker Buildx
2016
uses: docker/setup-buildx-action@v1
21-
-
22-
name: Get the version
23-
id: vars
24-
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
25-
-
26-
name: Login to DockerHub
27-
uses: docker/login-action@v1
17+
# GENERATE CHANGELOG, TAG, RELEASE
18+
- id: conventional_changelog
19+
uses: ardalanamini/auto-changelog@master
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
- id: compute_tag
23+
uses: craig-day/compute-tag@v11
24+
with:
25+
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
version_scheme: semantic
27+
version_type: patch
28+
# MAJOR.MINOR.PATCH
29+
- name: Create Release
30+
id: create_release
31+
uses: actions/create-release@latest
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
with:
35+
tag_name: ${{ steps.compute_tag.outputs.next_tag }}
36+
release_name: "App-Collection"
37+
body: |
38+
Automatic release of version: **${{ steps.compute_tag.outputs.next_tag }}**
39+
**Changes in this release:**
40+
${{ steps.conventional_changelog.outputs.changelog }}
41+
draft: false
42+
prerelease: false
43+
# DOCKER RELATED
44+
- name: Login to DockerHub
45+
uses: docker/login-action@v1
2846
with:
2947
username: ${{ secrets.DOCKERHUB_USERNAME }}
3048
password: ${{ secrets.DOCKERHUB_TOKEN }}
31-
-
32-
name: Login to GitHub Container Registry
33-
uses: docker/login-action@v1
49+
- name: Login to GitHub Container Registry
50+
uses: docker/login-action@v1
3451
with:
3552
registry: ghcr.io
3653
username: ${{ github.repository_owner }}
3754
password: ${{ secrets.CR_PAT }}
38-
-
39-
name: Build and push
55+
- name: Build and push
4056
uses: docker/build-push-action@v2
4157
with:
4258
context: .
@@ -46,5 +62,5 @@ jobs:
4662
tags: |
4763
${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:latest
4864
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:latest
49-
${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:${{steps.vars.outputs.tag}}
50-
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:${{steps.vars.outputs.tag}}
65+
${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:${{ steps.compute_tag.outputs.next_tag }}
66+
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:${{ steps.compute_tag.outputs.next_tag }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ $RECYCLE.BIN/
1616

1717
# Windows shortcuts
1818
*.lnk
19+
20+
# IntelliJ Idea
21+
.idea

0 commit comments

Comments
 (0)