trying new workflow build processes (#337)

* trying new workflow build processes
* added last bit to new try
This commit is contained in:
Zack Brady
2024-10-01 20:07:02 -04:00
committed by GitHub
parent 25d8cb83b2
commit 73e5c1ec8b
4 changed files with 15 additions and 13 deletions

View File

@@ -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

View File

@@ -31,7 +31,6 @@ jobs:
go-version-file: go.mod
check-latest: true
- name: Install Go Releaser
uses: goreleaser/goreleaser-action@v6
with:

View File

@@ -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:

View File

@@ -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/...