Skip to content

Merge pull request #6 from krystal/release-please--branches--master #2

Merge pull request #6 from krystal/release-please--branches--master

Merge pull request #6 from krystal/release-please--branches--master #2

Workflow file for this run

---
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