removed build step #14
This file contains hidden or 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
| name: Build kraken | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*' # match tags that start with v (like v1.0.0) | |
| branches: | |
| - dev | |
| - master | |
| paths: | |
| - '.github/workflows/kraken.yml' | |
| - 'kraken/**' | |
| jobs: | |
| build-docker-kraken: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write # to be able to publish docker images | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| # docker image build | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GHCR registry | |
| run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: build and push kraken | |
| working-directory: ./kraken | |
| run: | | |
| REGISTRY="ghcr.io/${{ github.repository }}/kraken" | |
| GIT_TAG=$(git describe --tags 2>/dev/null) | |
| GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null) | |
| docker build \ | |
| -t ${REGISTRY}:${GIT_TAG} \ | |
| -t ${REGISTRY}:${GIT_BRANCH} . | |
| if [[ ! -z "$GIT_TAG" && "$GIT_TAG" == v* ]]; then | |
| docker push ${REGISTRY}:${GIT_TAG} | |
| fi | |
| if [ ! -z "$GIT_BRANCH" ]; then | |
| docker push ${REGISTRY}:${GIT_BRANCH} | |
| fi |