From a0258a64e85bf9ceb0c779095b74c617415cef29 Mon Sep 17 00:00:00 2001 From: SebClem Date: Sun, 2 Apr 2023 12:57:22 +0200 Subject: [PATCH 1/4] Change default branche for renovate --- renovate.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index 19c1539..b32b775 100644 --- a/renovate.json +++ b/renovate.json @@ -2,5 +2,6 @@ "extends": [ "config:base" ], - "commitMessagePrefix": ":arrow_up:" + "commitMessagePrefix": ":arrow_up:", + "baseBranches": ["develop"] } From 63d742753007ac7c3e30e04d7f12d1c83fa48a37 Mon Sep 17 00:00:00 2001 From: SebClem Date: Fri, 29 Dec 2023 16:15:31 +0100 Subject: [PATCH 2/4] Fix branch --- .github/workflows/build.yml | 78 ----------------------------------- .github/workflows/release.yml | 78 ----------------------------------- .woodpecker/build_docker.yml | 2 +- 3 files changed, 1 insertion(+), 157 deletions(-) delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index bc88aeb..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,78 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Build - -on: - push: - branches-ignore: - - "renovate/**" - tags-ignore: - - "**" - -jobs: - build-gradle: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: 17 - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - name: Build with Gradle - run: ./gradlew build - - - name: Upload Jar File - uses: actions/upload-artifact@v2-preview - with: - name: claptrap_jar - path: build/libs/ - - build-docker: - runs-on: ubuntu-latest - needs: - - build-gradle - steps: - - uses: actions/checkout@v4 - - - name: Download artifact - uses: actions/download-artifact@v3.0.2 - with: - # Artifact name - name: claptrap_jar - # Destination path - path: build/libs/ - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to ghcr.io - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} - - - name: Get branch name - id: branch-name - uses: tj-actions/branch-names@v5.4 - - - name: Set tag - run: | - echo "tag=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_ENV - - - name: Build and push Docker - uses: docker/build-push-action@v5 - with: - push: true - context: . - tags: "ghcr.io/sebclem/claptrapbot:${{ env.tag }}" - file: ./Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index e5af1ae..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,78 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Build Release - -on: - push: - tags: - - "**" - -jobs: - build-gradle: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: 17 - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - name: Build with Gradle - run: ./gradlew build - - - name: Upload Jar File - uses: actions/upload-artifact@v2-preview - with: - name: claptrap_jar - path: build/libs/ - - build-docker: - runs-on: ubuntu-latest - needs: - - build-gradle - steps: - - uses: actions/checkout@v4 - - - name: Download artifact - uses: actions/download-artifact@v3.0.2 - with: - # Artifact name - name: claptrap_jar - # Destination path - path: build/libs/ - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to ghcr.io - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} - - - name: Get branch name - id: branch-name - uses: tj-actions/branch-names@v5.4 - - - name: Set tag - run: | - echo "tag=${{ steps.branch-name.outputs.tag }}" >> $GITHUB_ENV - - - name: Build and push Docker - uses: docker/build-push-action@v5 - with: - push: true - context: . - tags: | - ghcr.io/sebclem/claptrapbot:${{ env.tag }} - ghcr.io/sebclem/claptrapbot:latest - file: ./Dockerfile diff --git a/.woodpecker/build_docker.yml b/.woodpecker/build_docker.yml index 2552177..858ee52 100644 --- a/.woodpecker/build_docker.yml +++ b/.woodpecker/build_docker.yml @@ -5,7 +5,7 @@ steps: repo: git.sebclem.fr/sebclem/${CI_REPO_NAME,,} cache_from: git.sebclem.fr/sebclem/${CI_REPO_NAME,,} registry: git.sebclem.fr - auto_tag: true + tag: ${CI_COMMIT_BRANCH} logins: - registry: https://git.sebclem.fr username: From 14ddf2716c97f5d1e63c2f790ffdfe47e0a0fab1 Mon Sep 17 00:00:00 2001 From: SebClem Date: Fri, 29 Dec 2023 16:22:04 +0100 Subject: [PATCH 3/4] Ignore renovate build --- .woodpecker/build_docker.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.woodpecker/build_docker.yml b/.woodpecker/build_docker.yml index 858ee52..d3a1136 100644 --- a/.woodpecker/build_docker.yml +++ b/.woodpecker/build_docker.yml @@ -1,5 +1,21 @@ steps: - build-dev: + build-only: + image: woodpeckerci/plugin-docker-buildx + settings: + repo: git.sebclem.fr/sebclem/${CI_REPO_NAME,,} + cache_from: git.sebclem.fr/sebclem/${CI_REPO_NAME,,} + registry: git.sebclem.fr + logins: + - registry: https://git.sebclem.fr + username: + from_secret: docker_user + password: + from_secret: docker_token + when: + branch: renovate/* + event: [push, pull_request, manual] + + publish-dev: image: woodpeckerci/plugin-docker-buildx settings: repo: git.sebclem.fr/sebclem/${CI_REPO_NAME,,} @@ -13,6 +29,8 @@ steps: password: from_secret: docker_token when: + branch: + exclude: renovate/* event: [push, pull_request, manual] publish: From 6d831369cce966472891a4b2049853ea84d09aed Mon Sep 17 00:00:00 2001 From: SebClem Date: Fri, 29 Dec 2023 16:30:54 +0100 Subject: [PATCH 4/4] Add dry run --- .woodpecker/build_docker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker/build_docker.yml b/.woodpecker/build_docker.yml index d3a1136..f168e39 100644 --- a/.woodpecker/build_docker.yml +++ b/.woodpecker/build_docker.yml @@ -5,6 +5,7 @@ steps: repo: git.sebclem.fr/sebclem/${CI_REPO_NAME,,} cache_from: git.sebclem.fr/sebclem/${CI_REPO_NAME,,} registry: git.sebclem.fr + dry_run: true logins: - registry: https://git.sebclem.fr username: