Skip to content

Commit

Permalink
feat: trigger a release: v5.0 of scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
bencromwell committed Aug 4, 2023
1 parent af21989 commit 17c2fab
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---

on:
push:
pull_request:

build-latest:
runs-on: [ self-hosted, cluster ]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: docker/login-action@v2
with:
registry: ${{ vars.KRYSTAL_REGISTRY_HOST }}
username: ${{ vars.KRYSTAL_REGISTRY_USERNAME }}
password: ${{ secrets.KRYSTAL_REGISTRY_PASSWORD }}
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v3
with:
context: ./
file: ./Dockerfile
push: true
tags: registry.k.io/hosting/sonarcloud-github-action:latest
cache-from: type=gha
cache-to: type=gha,mode=max

build-release:
runs-on: [ self-hosted, cluster ]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
- uses: docker/login-action@v2
with:
registry: ${{ vars.KRYSTAL_REGISTRY_HOST }}
username: ${{ vars.KRYSTAL_REGISTRY_USERNAME }}
password: ${{ secrets.KRYSTAL_REGISTRY_PASSWORD }}
- id: version
run: echo "version=$(basename $GITHUB_REF)" >> $GITHUB_OUTPUT
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v3
with:
context: ./
file: ./Dockerfile
push: true
tags: registry.k.io/hosting/sonarcloud-github-action:${{ steps.version.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 17c2fab

Please sign in to comment.