Skip to content

Commit 7c782fd

Browse files
authored
Merge pull request #65 from Labbs/migration-to-labbs-org
Migration-to-labbs-org
2 parents ae2dc2f + f5c14af commit 7c782fd

File tree

10 files changed

+72
-369
lines changed

10 files changed

+72
-369
lines changed

.github/workflows/chart_release.yml

-19
This file was deleted.

.github/workflows/release.yml

+72-35
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,81 @@ name: Release
22

33
on:
44
push:
5-
# Sequence of patterns matched against refs/tags
65
tags:
7-
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
packages: write
11+
12+
env:
13+
REGISTRY: ghcr.io
14+
APP_NAME: ${{ github.repository }}
815

916
jobs:
1017
build:
11-
name: Upload Release Asset
18+
name: Build
1219
runs-on: ubuntu-latest
20+
1321
steps:
14-
- uses: actions/checkout@master
15-
- uses: actions/setup-go@v2
16-
with:
17-
go-version: '1.16'
18-
19-
- name: Get the version
20-
id: get_version
21-
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
22-
23-
- name: Build
24-
run: CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags="-X 'main.version=${{ steps.get_version.outputs.VERSION }}'" -o github-actions-exporter
25-
26-
- name: Create Release
27-
id: create_release
28-
uses: actions/[email protected]
29-
env:
30-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
31-
with:
32-
tag_name: ${{ github.ref }}
33-
release_name: Release ${{ github.ref }}
34-
draft: false
35-
prerelease: false
36-
- name: Upload Release Asset
37-
id: upload-release-asset
38-
uses: actions/[email protected]
39-
env:
40-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
41-
with:
42-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
43-
asset_path: github-actions-exporter
44-
asset_name: github-actions-exporter
45-
asset_content_type: application/binary
22+
- uses: actions/checkout@v3
23+
- uses: actions/setup-go@v3
24+
with:
25+
# go-version: 1.19
26+
go-version-file: go.mod
27+
# The builtin cache feature ensures that installing golangci-lint
28+
# is consistently fast.
29+
cache: true
30+
cache-dependency-path: go.sum
31+
32+
- uses: nowsprinting/check-version-format-action@v3
33+
if: github.event_name != 'pull_request'
34+
id: version
35+
with:
36+
prefix: 'v'
37+
38+
- name: Build app
39+
run: CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags="-X 'main.version=${{ steps.version.outputs.full }}'" -o bin/${{ env.APP_NAME }} .
40+
41+
- name: Generate MD5
42+
run: md5sum bin/${{ env.APP_NAME }} > bin/${{ env.APP_NAME }}.md5
43+
44+
- name: Push to release
45+
uses: softprops/action-gh-release@v1
46+
with:
47+
token: ${{ secrets.GITHUB_TOKEN }}
48+
generate_release_notes: true
49+
files: |
50+
bin/${{ env.APP_NAME }}
51+
bin/${{ env.APP_NAME }}.md5
52+
prerelease: ${{ steps.version.outputs.prerelease }}
53+
54+
- name: Docker meta
55+
id: meta
56+
uses: docker/metadata-action@v3
57+
with:
58+
images: ${{ env.REGISTRY }}/${{ env.APP_NAME }}
59+
tags: |
60+
type=ref,event=branch
61+
type=ref,event=pr
62+
type=semver,pattern={{version}}
63+
type=semver,pattern={{major}}.{{minor}}
64+
type=semver,pattern={{major}}
65+
type=sha
66+
67+
- name: Log in to GitHub Container Registry
68+
uses: docker/login-action@v2
69+
if: github.event_name != 'pull_request'
70+
with:
71+
registry: ${{ env.REGISTRY }}
72+
username: ${{ github.actor }}
73+
password: ${{ secrets.GH_TOKEN }}
74+
75+
- name: Build and push
76+
uses: docker/build-push-action@v4
77+
with:
78+
context: .
79+
file: ./Dockerfile
80+
push: ${{ github.event_name != 'pull_request' }}
81+
tags: ${{ steps.meta.outputs.tags }}
82+
labels: ${{ steps.meta.outputs.labels }}

deploy/helm-chart/github-actions-exporter/.helmignore

-23
This file was deleted.

deploy/helm-chart/github-actions-exporter/Chart.yaml

-14
This file was deleted.

deploy/helm-chart/github-actions-exporter/templates/NOTES.txt

Whitespace-only changes.

deploy/helm-chart/github-actions-exporter/templates/_helpers.tpl

-52
This file was deleted.

deploy/helm-chart/github-actions-exporter/templates/deployment.yaml

-89
This file was deleted.

deploy/helm-chart/github-actions-exporter/templates/service.yaml

-17
This file was deleted.

deploy/helm-chart/github-actions-exporter/templates/serviceMonitor.yaml

-43
This file was deleted.

0 commit comments

Comments
 (0)