Skip to content

Commit

Permalink
Merge pull request #65 from Labbs/migration-to-labbs-org
Browse files Browse the repository at this point in the history
Migration-to-labbs-org
  • Loading branch information
moutonjeremy authored Nov 7, 2023
2 parents ae2dc2f + f5c14af commit 7c782fd
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 369 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/chart_release.yml

This file was deleted.

107 changes: 72 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
23 changes: 0 additions & 23 deletions deploy/helm-chart/github-actions-exporter/.helmignore

This file was deleted.

14 changes: 0 additions & 14 deletions deploy/helm-chart/github-actions-exporter/Chart.yaml

This file was deleted.

Empty file.
52 changes: 0 additions & 52 deletions deploy/helm-chart/github-actions-exporter/templates/_helpers.tpl

This file was deleted.

This file was deleted.

17 changes: 0 additions & 17 deletions deploy/helm-chart/github-actions-exporter/templates/service.yaml

This file was deleted.

This file was deleted.

Loading

0 comments on commit 7c782fd

Please sign in to comment.