mirror of
https://github.com/pldubouilh/gossa
synced 2025-12-06 08:22:32 +01:00
bump go & auto-release from CI
This commit is contained in:
parent
a1613a08e8
commit
418af92512
3 changed files with 67 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
name: ci
|
name: always
|
||||||
on: [push]
|
on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -6,10 +6,10 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Set up Go 1.18
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v1
|
||||||
with:
|
with:
|
||||||
go-version: 1.18
|
go-version: 1.19.1
|
||||||
id: go
|
id: go
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
26
.github/workflows/deploy.yml
vendored
26
.github/workflows/deploy.yml
vendored
|
|
@ -14,6 +14,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: 1.19.1
|
||||||
|
id: go
|
||||||
|
|
||||||
- name: Set env
|
- name: Set env
|
||||||
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
|
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
|
@ -29,7 +35,7 @@ jobs:
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and release on dockerhub
|
||||||
uses: docker/build-push-action@v2.7.0
|
uses: docker/build-push-action@v2.7.0
|
||||||
with:
|
with:
|
||||||
file: support/build.Dockerfile
|
file: support/build.Dockerfile
|
||||||
|
|
@ -37,3 +43,21 @@ jobs:
|
||||||
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
||||||
tags: pldubouilh/gossa:latest,pldubouilh/gossa:${{github.ref_name}}
|
tags: pldubouilh/gossa:latest,pldubouilh/gossa:${{github.ref_name}}
|
||||||
|
|
||||||
|
- name: Build all artifacts
|
||||||
|
run: make build-all
|
||||||
|
|
||||||
|
- name: "Release gh release versioned"
|
||||||
|
uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37
|
||||||
|
with:
|
||||||
|
allowUpdates: true
|
||||||
|
artifacts: "builds/*"
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: "Release gh release latest"
|
||||||
|
uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37
|
||||||
|
with:
|
||||||
|
tag: latest
|
||||||
|
name: Latest
|
||||||
|
allowUpdates: true
|
||||||
|
artifacts: "builds/*"
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
39
.github/workflows/rc.yml
vendored
Normal file
39
.github/workflows/rc.yml
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
name: rc
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'rc/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: 1.19.1
|
||||||
|
id: go
|
||||||
|
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Run
|
||||||
|
run: make ci
|
||||||
|
|
||||||
|
- name: Build all artifacts
|
||||||
|
run: make build-all
|
||||||
|
|
||||||
|
- name: "Release gh release prerelease"
|
||||||
|
uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37
|
||||||
|
with:
|
||||||
|
allowUpdates: true
|
||||||
|
prerelease: true
|
||||||
|
tag: "rc"
|
||||||
|
artifacts: "builds/*"
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
Loading…
Reference in a new issue