Skip to content

Commit

Permalink
chore: created an action for releasing
Browse files Browse the repository at this point in the history
  • Loading branch information
isala404 committed May 15, 2022
1 parent 6de08e5 commit 0039dd1
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: release

on: workflow_dispatch

jobs:
publish:
name: Create GH Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: main
- name: Release
uses: go-semantic-release/action@master
with:
github-token: ${{ secrets.TOKEN }}
prepend: true
changelog-file: CHANGELOG.md
- name: Update CHANGELOG.md
run: |
git config user.name github-actions
git config user.email [email protected]
git add CHANGELOG.md
git commit -m "docs: Update the changelog"
git push origin
122 changes: 122 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: release

on:
push:
tags:
- v*

env:
CONTROLLER_IMAGE_NAME: ghcr.io/mrsupiri/lazy-koala/controller
GAZER_IMAGE_NAME: ghcr.io/mrsupiri/lazy-koala/gazer
INSPECTOR_IMAGE_NAME: ghcr.io/mrsupiri/lazy-koala/inspector
SHERLOCK_IMAGE_NAME: ghcr.io/mrsupiri/lazy-koala/sherlock
DOCKER_BUILDKIT: 1

jobs:
controller:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: control-plane
steps:
- uses: actions/checkout@v2
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Tag
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- run: docker build -t $CONTROLLER_IMAGE_NAME:latest .
- run: docker tag $CONTROLLER_IMAGE_NAME:latest $CONTROLLER_IMAGE_NAME:${{ steps.vars.outputs.tag }}
- run: docker push $CONTROLLER_IMAGE_NAME --all-tags


gazer:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: gazer
steps:
- uses: actions/checkout@v2
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Tag
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- run: docker build -t $GAZER_IMAGE_NAME:latest .
- run: docker tag $GAZER_IMAGE_NAME:latest $GAZER_IMAGE_NAME:${{ steps.vars.outputs.tag }}
- run: docker push $GAZER_IMAGE_NAME --all-tags
gazer-headers:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: gazer/init-headers
steps:
- uses: actions/checkout@v2
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Tag
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- run: docker build -t $GAZER_IMAGE_NAME:init .
- run: docker tag $GAZER_IMAGE_NAME:init $GAZER_IMAGE_NAME:init-${{ steps.vars.outputs.tag }}
- run: docker push $GAZER_IMAGE_NAME --all-tags


inspector:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Tag
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- run: docker build -t $INSPECTOR_IMAGE_NAME:latest -f inspector/Dockerfile .
- run: docker tag $INSPECTOR_IMAGE_NAME:latest $INSPECTOR_IMAGE_NAME:${{ steps.vars.outputs.tag }}
- run: docker push $INSPECTOR_IMAGE_NAME --all-tags


sherlock:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: sherlock
steps:
- uses: actions/checkout@v2
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Tag
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- run: docker build -t $SHERLOCK_IMAGE_NAME:latest .
- run: docker tag $SHERLOCK_IMAGE_NAME:latest $SHERLOCK_IMAGE_NAME:${{ steps.vars.outputs.tag }}
- run: docker push $SHERLOCK_IMAGE_NAME --all-tags


helm-chart:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: helm package charts/lazy-koala -d dist/
Empty file added CHANGELOG.md
Empty file.

0 comments on commit 0039dd1

Please sign in to comment.