mirror of
https://github.com/hauler-dev/hauler.git
synced 2026-02-14 09:59:50 +00:00
trying new workflow build processes (#337)
* trying new workflow build processes * added last bit to new try
This commit is contained in:
10
.github/workflows/release.yaml
vendored
10
.github/workflows/release.yaml
vendored
@@ -42,7 +42,7 @@ jobs:
|
||||
name: Container Release Job
|
||||
runs-on: ubuntu-latest
|
||||
needs: [go-release]
|
||||
timeout-minutes: 60
|
||||
timeout-minutes: 240
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -74,8 +74,8 @@ jobs:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and Push Release Container to GitHub Container Registry
|
||||
uses: docker/build-push-action@v5
|
||||
- name: Build and Push Release Container to GitHub Container Registry/DockerHub Container Registry
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
target: release
|
||||
@@ -83,8 +83,8 @@ jobs:
|
||||
push: true
|
||||
tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }}, docker.io/hauler/hauler:${{ github.ref_name }}
|
||||
|
||||
- name: Build and Push Debug Container to GitHub Container Registry
|
||||
uses: docker/build-push-action@v5
|
||||
- name: Build and Push Debug Container to GitHub Container Registry/DockerHub Container Registry
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
target: debug
|
||||
|
||||
1
.github/workflows/tests.yaml
vendored
1
.github/workflows/tests.yaml
vendored
@@ -31,7 +31,6 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
check-latest: true
|
||||
|
||||
|
||||
- name: Install Go Releaser
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
|
||||
@@ -3,8 +3,14 @@ version: 2
|
||||
project_name: hauler
|
||||
before:
|
||||
hooks:
|
||||
- rm -rf cmd/hauler/binaries
|
||||
- mkdir -p cmd/hauler/binaries
|
||||
- touch cmd/hauler/binaries/file
|
||||
- go mod tidy
|
||||
- go mod download
|
||||
- go fmt ./...
|
||||
- go vet ./...
|
||||
- go test ./... -cover -race -covermode=atomic -coverprofile=coverage.out
|
||||
- rm -rf cmd/hauler/binaries
|
||||
|
||||
release:
|
||||
|
||||
11
Makefile
11
Makefile
@@ -4,12 +4,9 @@
|
||||
SHELL=/bin/bash
|
||||
|
||||
# set go variables
|
||||
GO_FILES=$(shell go list ./... | grep -v /vendor/)
|
||||
GO_FILES=./...
|
||||
GO_COVERPROFILE=coverage.out
|
||||
|
||||
# set cosign variables
|
||||
COSIGN_VERSION=v2.2.3+carbide.3
|
||||
|
||||
# set build variables
|
||||
BIN_DIRECTORY=bin
|
||||
DIST_DIRECTORY=dist
|
||||
@@ -17,19 +14,19 @@ BINARIES_DIRECTORY=cmd/hauler/binaries
|
||||
|
||||
# builds hauler for current platform
|
||||
# references other targets
|
||||
build: install fmt vet test
|
||||
build:
|
||||
goreleaser build --clean --snapshot --parallelism 1 --single-target
|
||||
|
||||
# builds hauler for all platforms
|
||||
# references other targets
|
||||
build-all: install fmt vet test
|
||||
build-all:
|
||||
goreleaser build --clean --snapshot --parallelism 1
|
||||
|
||||
# install depedencies
|
||||
install:
|
||||
rm -rf $(BINARIES_DIRECTORY)
|
||||
mkdir -p $(BINARIES_DIRECTORY)
|
||||
date > $(BINARIES_DIRECTORY)/date.txt
|
||||
touch cmd/hauler/binaries/file
|
||||
go mod tidy
|
||||
go mod download
|
||||
CGO_ENABLED=0 go install ./cmd/...
|
||||
|
||||
Reference in New Issue
Block a user