mirror of
https://github.com/BreizhHardware/ntfy_alerts.git
synced 2026-03-18 21:40:38 +01:00
chore(ci): remove GitHub release build to use Docker only
Edit CI configuration to remove GitHub release build. Now, builds are only for Docker, and I will use the Conventional Release Bot app to manage releases.
This commit is contained in:
103
.github/workflows/create_release.yml
vendored
103
.github/workflows/create_release.yml
vendored
@@ -1,73 +1,30 @@
|
|||||||
name: Docker Build and Release
|
name: Docker Build and Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push-on-docker-hub:
|
build-and-push-on-docker-hub:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ secrets.DOCKER_USERNAME }}/github-ntfy:latest
|
tags: ${{ secrets.DOCKER_USERNAME }}/github-ntfy:latest
|
||||||
|
|
||||||
release-on-github:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Get the latest tag
|
|
||||||
id: get_latest_tag
|
|
||||||
run: echo "latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Increment version
|
|
||||||
id: increment_version
|
|
||||||
run: |
|
|
||||||
latest_tag=${{ env.latest_tag }}
|
|
||||||
if [ -z "$latest_tag" ]; then
|
|
||||||
new_version="v1.5.2"
|
|
||||||
else
|
|
||||||
IFS='.' read -r -a version_parts <<< "${latest_tag#v}"
|
|
||||||
new_version="v${version_parts[0]}.$((version_parts[1] + 1)).0"
|
|
||||||
fi
|
|
||||||
echo "new_version=$new_version" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Read changelog
|
|
||||||
id: read_changelog
|
|
||||||
run: echo "changelog=$(base64 -w 0 CHANGELOG.md)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Decode changelog
|
|
||||||
id: decode_changelog
|
|
||||||
run: echo "${{ env.changelog }}" | base64 -d > decoded_changelog.txt
|
|
||||||
|
|
||||||
- name: Create Release
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ env.new_version }}
|
|
||||||
release_name: Release ${{ env.new_version }}
|
|
||||||
body: ${{ steps.decode_changelog.outputs.changelog }}
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
73
.github/workflows/create_release.yml.old
vendored
Normal file
73
.github/workflows/create_release.yml.old
vendored
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
name: Docker Build and Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push-on-docker-hub:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: ${{ secrets.DOCKER_USERNAME }}/github-ntfy:latest
|
||||||
|
|
||||||
|
release-on-github:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Get the latest tag
|
||||||
|
id: get_latest_tag
|
||||||
|
run: echo "latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Increment version
|
||||||
|
id: increment_version
|
||||||
|
run: |
|
||||||
|
latest_tag=${{ env.latest_tag }}
|
||||||
|
if [ -z "$latest_tag" ]; then
|
||||||
|
new_version="v1.5.2"
|
||||||
|
else
|
||||||
|
IFS='.' read -r -a version_parts <<< "${latest_tag#v}"
|
||||||
|
new_version="v${version_parts[0]}.$((version_parts[1] + 1)).0"
|
||||||
|
fi
|
||||||
|
echo "new_version=$new_version" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Read changelog
|
||||||
|
id: read_changelog
|
||||||
|
run: echo "changelog=$(base64 -w 0 CHANGELOG.md)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Decode changelog
|
||||||
|
id: decode_changelog
|
||||||
|
run: echo "${{ env.changelog }}" | base64 -d > decoded_changelog.txt
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ env.new_version }}
|
||||||
|
release_name: Release ${{ env.new_version }}
|
||||||
|
body: ${{ steps.decode_changelog.outputs.changelog }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
Reference in New Issue
Block a user