Skip to content

Commit

Permalink
merge pull request #252 from zackbradys/main
Browse files Browse the repository at this point in the history
overhauling github actions and workflows
  • Loading branch information
zackbradys authored Jun 25, 2024
2 parents 0ec77b4 + d90545a commit ceb7760
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug Report
about: Create a report to help us improve!
about: Submit a bug report to help us improve!
title: '[BUG]'
labels: 'bug'
assignees: ''
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Feature Request
about: Submit a request for us to improve!
about: Submit a feature request for us to improve!
title: '[RFE]'
labels: 'enhancement'
assignees: ''
Expand Down
34 changes: 32 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
go-version: 1.21.x

- name: Run Go Releaser
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
Expand All @@ -36,6 +36,7 @@ jobs:
name: Container Release Job
runs-on: ubuntu-latest
timeout-minutes: 30
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -48,7 +49,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
- name: Authenticate to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
Expand All @@ -62,3 +63,32 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }}

chart-release:
name: Chart Release Job
runs-on: ubuntu-latest
timeout-minutes: 30
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Authenticate to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set Up Helm
uses: azure/setup-helm@v4

- name: Build Helm Chart
run: |
helm package deploy/kubernetes/helm/charts/hauler --destination deploy/kubernetes/helm/charts/hauler
- name: Push to GitHub Container Registry
run: |
helm push deploy/kubernetes/helm/charts/hauler/hauler-*.tgz oci://ghcr.io/${{ github.repository_owner }}/charts
11 changes: 6 additions & 5 deletions .github/workflows/unittest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ jobs:
run: |
mkdir -p cmd/hauler/binaries
touch cmd/hauler/binaries/dummy.txt
go test -race -covermode=atomic -coverprofile=coverage.out ./pkg/... ./internal/... ./cmd/...
go test -race -covermode=atomic -coverprofile=coverage.out ./...
- name: On Failure, Launch Debug Session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 10
- name: Upload Coverage Report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.out
6 changes: 3 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ universal_binaries:
- replace: false

changelog:
skip: false
disable: false
use: git

brews:
- name: hauler
tap:
repository:
owner: rancherfederal
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
folder: Formula
directory: Formula
description: "Hauler CLI"
4 changes: 2 additions & 2 deletions deploy/kubernetes/helm/charts/hauler/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ name: hauler
description: Hauler Helm Chart - Airgap Swiss Army Knife
icon: https://raw.githubusercontent.com/rancherfederal/hauler/main/static/rgs-hauler-logo-icon.svg
type: application
version: 0.1.0
appVersion: 1.0.2
version: 1.0.3
appVersion: 1.0.3
2 changes: 1 addition & 1 deletion deploy/kubernetes/helm/charts/hauler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

| Type | Chart Version | App Version |
| ----------- | ------------- | ----------- |
| application | `0.1.0` | `1.0.2` |
| application | `1.0.3` | `1.0.3` |

## Installing the Chart

Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/helm/charts/hauler/app-readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

| Type | Chart Version | App Version |
| ----------- | ------------- | ----------- |
| application | `0.1.0` | `1.0.2` |
| application | `1.0.3` | `1.0.3` |

## Installing the Chart

Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/helm/charts/hauler/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
hauler:
image:
repository: ghcr.io/rancherfederal/hauler
tag: v1.0.2
tag: v1.0.3
imagePullPolicy: Always

initContainers:
Expand Down
Empty file modified testdata/haul.tar.zst
100644 → 100755
Empty file.
Empty file modified testdata/hauler-manifest.yaml
100644 → 100755
Empty file.
Empty file modified testdata/rancher-cluster-templates-0.4.4.tgz
100644 → 100755
Empty file.

0 comments on commit ceb7760

Please sign in to comment.