-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from Labbs/migration-to-labbs-org
Migration-to-labbs-org
- Loading branch information
Showing
10 changed files
with
72 additions
and
369 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,44 +2,81 @@ name: Release | |
|
||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
- 'v*' | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
APP_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build: | ||
name: Upload Release Asset | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.16' | ||
|
||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
|
||
- name: Build | ||
run: CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags="-X 'main.version=${{ steps.get_version.outputs.VERSION }}'" -o github-actions-exporter | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
with: | ||
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 | ||
asset_path: github-actions-exporter | ||
asset_name: github-actions-exporter | ||
asset_content_type: application/binary | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
# go-version: 1.19 | ||
go-version-file: go.mod | ||
# The builtin cache feature ensures that installing golangci-lint | ||
# is consistently fast. | ||
cache: true | ||
cache-dependency-path: go.sum | ||
|
||
- uses: nowsprinting/check-version-format-action@v3 | ||
if: github.event_name != 'pull_request' | ||
id: version | ||
with: | ||
prefix: 'v' | ||
|
||
- name: Build app | ||
run: CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags="-X 'main.version=${{ steps.version.outputs.full }}'" -o bin/${{ env.APP_NAME }} . | ||
|
||
- name: Generate MD5 | ||
run: md5sum bin/${{ env.APP_NAME }} > bin/${{ env.APP_NAME }}.md5 | ||
|
||
- name: Push to release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
generate_release_notes: true | ||
files: | | ||
bin/${{ env.APP_NAME }} | ||
bin/${{ env.APP_NAME }}.md5 | ||
prerelease: ${{ steps.version.outputs.prerelease }} | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.APP_NAME }} | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
type=sha | ||
- name: Log in to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
if: github.event_name != 'pull_request' | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
52 changes: 0 additions & 52 deletions
52
deploy/helm-chart/github-actions-exporter/templates/_helpers.tpl
This file was deleted.
Oops, something went wrong.
89 changes: 0 additions & 89 deletions
89
deploy/helm-chart/github-actions-exporter/templates/deployment.yaml
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
deploy/helm-chart/github-actions-exporter/templates/service.yaml
This file was deleted.
Oops, something went wrong.
43 changes: 0 additions & 43 deletions
43
deploy/helm-chart/github-actions-exporter/templates/serviceMonitor.yaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.