chore(ci): rollback auto release

This commit is contained in:
Nicolas Carlier 2023-10-04 19:19:40 +00:00
parent 4ce655f38b
commit 13ef163928
4 changed files with 58 additions and 150 deletions

View File

@ -3,49 +3,49 @@ name: Build
on:
push:
branches: [ master ]
tags: [ 'v*' ]
pull_request:
branches: [ master ]
jobs:
# Build and test project
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v2
- uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Test
run: make build test
go-version: stable
- run: make build test
# Create project release if tagged
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Conventional CHANGELOG
- uses: actions/setup-go@v4
with:
go-version: stable
- uses: actions/setup-node@v3
with:
node-version: current
- run: npm install -g standard-changelog
- run: make distribution
- name: get CHANGELOG
id: changelog
uses: TriPSs/conventional-changelog-action@v3
if: github.ref == 'refs/heads/master'
uses: requarks/changelog-action@v1
with:
github-token: ${{ secrets.github_token }}
- name: Set up Go
uses: actions/setup-go@v2
token: ${{ github.token }}
tag: ${{ github.ref_name }}
- uses: softprops/action-gh-release@v1
with:
go-version: 1.21
- name: Distribution
run: make distribution
if: github.ref == 'refs/heads/master' && steps.changelog.outputs.skipped == 'false'
- name: Release
uses: softprops/action-gh-release@v1
if: github.ref == 'refs/heads/master' && steps.changelog.outputs.skipped == 'false'
with:
body: ${{ steps.changelog.outputs.clean_changelog }}
tag_name: ${{ steps.changelog.outputs.tag }}
name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.changes }}
files: |
release/webhookd-linux-amd64.tgz
release/webhookd-linux-arm64.tgz
@ -53,3 +53,37 @@ jobs:
release/webhookd-darwin-amd64.tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Publish Docker image
publish:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ncarlier/feedpushr
tags: |
type=edge
type=semver,pattern={{version}}
- uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: arm64,arm
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -1,63 +0,0 @@
name: Publish Docker image
on:
release:
types: [published]
push:
branches:
- 'master'
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
with:
submodules: 'true'
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ncarlier/webhookd
tags: |
type=edge
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: arm64,arm
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push Docker image (slim)
uses: docker/build-push-action@v2
with:
context: .
target: slim
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image (distrib)
uses: docker/build-push-action@v2
with:
context: .
target: distrib
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}-distrib
labels: ${{ steps.meta.outputs.labels }}

View File

@ -1,60 +0,0 @@
## [1.17.3](https://github.com/ncarlier/webhookd/compare/v1.17.2...v1.17.3) (2023-10-03)
### Bug Fixes
* **ci:** fix release step ([b19a1c1](https://github.com/ncarlier/webhookd/commit/b19a1c1f7e36104ec3ec03c728562c2e59c80a97))
## [1.17.2](https://github.com/ncarlier/webhookd/compare/v1.17.1...v1.17.2) (2023-10-03)
### Bug Fixes
* lint code ([af39ad7](https://github.com/ncarlier/webhookd/commit/af39ad75c6bf34abeb0c7f35bdf7fd16adb43421))
## [1.17.1](https://github.com/ncarlier/webhookd/compare/v1.16.0...v1.17.1) (2023-10-03)
### Bug Fixes
* **ci:** fix CHANGELOG version ([cd5f88a](https://github.com/ncarlier/webhookd/commit/cd5f88a3aa4b4725d577d9ee3c6bbd3f7d87d895))
* **ci:** fix CHANGELOG version ([fa489bc](https://github.com/ncarlier/webhookd/commit/fa489bc58f914a0460717c1b683aa33cc2c975c0))
### Features
* structured logging ([0d802d0](https://github.com/ncarlier/webhookd/commit/0d802d03eb914fcb72484bbc90cb5831a845f2cc))
# [1.16.0](https://github.com/ncarlier/webhookd/compare/v1.15.1...v1.16.0) (2023-03-28)
### Features
* **auth:** add username header ([2fb8e9a](https://github.com/ncarlier/webhookd/commit/2fb8e9aa845a79b90716b5cd22b31eb99e56e314))
* **middleware:** add X-Forwarded-For middleware ([dba7604](https://github.com/ncarlier/webhookd/commit/dba7604a434528fba9e1266e11f55de954a0fd3b)), closes [#73](https://github.com/ncarlier/webhookd/issues/73)
* **signature:** signature refactoring ([f2054d2](https://github.com/ncarlier/webhookd/commit/f2054d2dc40ab137956e69268eb593c90b57ce19)), closes [#72](https://github.com/ncarlier/webhookd/issues/72)
## [1.15.1](https://github.com/ncarlier/webhookd/compare/v1.15.0...v1.15.1) (2022-10-01)
### Bug Fixes
* **tooling:** correct help message ([ab4dc1e](https://github.com/ncarlier/webhookd/commit/ab4dc1eedde648eb21df8c00749c1668ae4fc169)), closes [#58](https://github.com/ncarlier/webhookd/issues/58)
### Features
* **docker:** add ARM Docker image ([ed1f5da](https://github.com/ncarlier/webhookd/commit/ed1f5da6c27121c1a3879c39e1a79bea99f542ce))
* **docker:** create slim and distrib Docker image ([5f8a76f](https://github.com/ncarlier/webhookd/commit/5f8a76f5f25dde7e2bf5752a02e11fdcb7833b33))
* trace real IP ([50bcb16](https://github.com/ncarlier/webhookd/commit/50bcb16c715c50860d8114c7893419c71eb17ae9))

View File

@ -1,3 +0,0 @@
{
"version": "1.17.3"
}