mirror of
https://github.com/bitvora/wot-relay.git
synced 2025-06-23 16:05:35 +00:00
remove releases, add docker back
This commit is contained in:
parent
2e7105fbdd
commit
af155c1f48
36
.github/workflows/docker-build.yml
vendored
Normal file
36
.github/workflows/docker-build.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: Docker Build and Publish
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["master"]
|
||||||
|
pull_request:
|
||||||
|
branches: ["master"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile-optimized
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: |
|
||||||
|
ghcr.io/${{ github.repository }}:latest
|
||||||
|
ghcr.io/${{ github.repository }}:${{ github.sha }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
69
.github/workflows/release.yml
vendored
69
.github/workflows/release.yml
vendored
@ -1,69 +0,0 @@
|
|||||||
name: build relay for all platforms
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "*"
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
make-release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Install build-essential and LMDB development files
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y build-essential liblmdb-dev
|
|
||||||
|
|
||||||
- name: Create Release
|
|
||||||
uses: actions/create-release@latest
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.ref_name }}
|
|
||||||
release_name: ${{ github.ref_name }}
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
build-all-for-all:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- make-release
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
goos: [linux, freebsd, darwin, windows]
|
|
||||||
goarch: [amd64, arm64, riscv64]
|
|
||||||
exclude:
|
|
||||||
- goarch: arm64
|
|
||||||
goos: windows
|
|
||||||
- goarch: riscv64
|
|
||||||
goos: windows
|
|
||||||
- goarch: riscv64
|
|
||||||
goos: darwin
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install build-essential and LMDB development files
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y build-essential liblmdb-dev
|
|
||||||
|
|
||||||
- name: Set CGO_ENABLED=1
|
|
||||||
run: |
|
|
||||||
export CGO_ENABLED=1
|
|
||||||
|
|
||||||
- name: Build application with Go
|
|
||||||
run: |
|
|
||||||
go env # Print Go environment details for debugging
|
|
||||||
go build ./...
|
|
||||||
|
|
||||||
- uses: wangyoucao577/go-release-action@v1.40
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
goos: ${{ matrix.goos }}
|
|
||||||
goarch: ${{ matrix.goarch }}
|
|
||||||
overwrite: true
|
|
||||||
md5sum: false
|
|
||||||
sha256sum: false
|
|
||||||
compress_assets: false
|
|
Loading…
x
Reference in New Issue
Block a user