From ccb0c6eee80b3eaa74fb8ade97080e54b7fcf464 Mon Sep 17 00:00:00 2001 From: SebClem Date: Sat, 11 Jun 2022 18:27:34 +0200 Subject: [PATCH] :robot: Change ci --- .github/workflows/build.yml | 20 +++++++++++++++----- renovate.json | 3 ++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60ac959..61a487c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,9 +5,6 @@ name: Build on: push: - branches: [ master ] - pull_request: - branches: [ master ] jobs: build-gradle: @@ -38,7 +35,6 @@ jobs: runs-on: ubuntu-latest needs: - build-gradle - if: github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v2 @@ -60,10 +56,24 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.CR_PAT }} + - name: Get branch name + id: branch-name + uses: tj-actions/branch-names@v5.2 + + - name: Set tag master + if: steps.branch-name.outputs.current_branch == 'master' + run: | + echo "tag=latest" >> $GITHUB_ENV + + - name: Set tag + if: steps.branch-name.outputs.current_branch != 'master' + run: | + echo "tag=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_ENV + - name: Build and push Docker uses: docker/build-push-action@v2 with: push: true context: . - tags: ghcr.io/sebclem/claptrapbot:latest + tags: "ghcr.io/sebclem/claptrapbot:${{ env.tag }}" file: ./Dockerfile \ No newline at end of file diff --git a/renovate.json b/renovate.json index f45d8f1..8a0c502 100644 --- a/renovate.json +++ b/renovate.json @@ -1,5 +1,6 @@ { "extends": [ "config:base" - ] + ], + "commitMessageSuffix": "[skip ci]" }