Compare commits
7 Commits
9ec4d2a831
...
7ba26fef46
Author | SHA1 | Date | |
---|---|---|---|
7ba26fef46 | |||
6d831369cc | |||
14ddf2716c | |||
63d7427530 | |||
b03bfeb28c | |||
a0258a64e8 | |||
ded6513a02 |
78
.github/workflows/build.yml
vendored
78
.github/workflows/build.yml
vendored
@ -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
|
|
78
.github/workflows/release.yml
vendored
78
.github/workflows/release.yml
vendored
@ -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
|
|
@ -1,11 +1,11 @@
|
|||||||
steps:
|
steps:
|
||||||
build-dev:
|
build-only:
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
settings:
|
||||||
repo: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
|
repo: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
|
||||||
cache_from: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
|
cache_from: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
|
||||||
registry: git.sebclem.fr
|
registry: git.sebclem.fr
|
||||||
auto_tag: true
|
dry_run: true
|
||||||
logins:
|
logins:
|
||||||
- registry: https://git.sebclem.fr
|
- registry: https://git.sebclem.fr
|
||||||
username:
|
username:
|
||||||
@ -13,6 +13,25 @@ steps:
|
|||||||
password:
|
password:
|
||||||
from_secret: docker_token
|
from_secret: docker_token
|
||||||
when:
|
when:
|
||||||
|
branch: renovate/*
|
||||||
|
event: [push, pull_request, manual]
|
||||||
|
|
||||||
|
publish-dev:
|
||||||
|
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
|
||||||
|
tag: ${CI_COMMIT_BRANCH}
|
||||||
|
logins:
|
||||||
|
- registry: https://git.sebclem.fr
|
||||||
|
username:
|
||||||
|
from_secret: docker_user
|
||||||
|
password:
|
||||||
|
from_secret: docker_token
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
exclude: renovate/*
|
||||||
event: [push, pull_request, manual]
|
event: [push, pull_request, manual]
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
"extends": [
|
"extends": [
|
||||||
"config:base"
|
"config:base"
|
||||||
],
|
],
|
||||||
"commitMessagePrefix": ":arrow_up:"
|
"commitMessagePrefix": ":arrow_up:",
|
||||||
|
"baseBranches": ["develop"]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user