forked from github-mirror/CoreProtect
Delete directory '.gitea'
Build / Build (push) Failing after 44s
Build / Build (push) Failing after 44s
This commit is contained in:
1 parent
3de5831278
commit
30f90262b5
1 file changed
-73
@@ -1,73 +0,0 @@
|
|||||||
name: Daily Autobuild
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 3 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build & Release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
run: |
|
|
||||||
git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git repo
|
|
||||||
|
|
||||||
- name: Set up JDK 25
|
|
||||||
run: |
|
|
||||||
apt-get update -q
|
|
||||||
apt-get install -y wget
|
|
||||||
wget -q "https://api.adoptium.net/v3/binary/latest/25/ga/linux/x64/jdk/hotspot/normal/eclipse" \
|
|
||||||
-O /tmp/jdk.tar.gz
|
|
||||||
mkdir -p /opt/jdk
|
|
||||||
tar -xzf /tmp/jdk.tar.gz -C /opt/jdk --strip-components=1
|
|
||||||
echo "JAVA_HOME=/opt/jdk" >> $GITHUB_ENV
|
|
||||||
echo "/opt/jdk/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: Install Maven
|
|
||||||
run: |
|
|
||||||
wget -q "https://downloads.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz" \
|
|
||||||
-O /tmp/mvn.tar.gz
|
|
||||||
mkdir -p /opt/mvn
|
|
||||||
tar -xzf /tmp/mvn.tar.gz -C /opt/mvn --strip-components=1
|
|
||||||
echo "/opt/mvn/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
working-directory: repo
|
|
||||||
run: mvn -B verify
|
|
||||||
|
|
||||||
- name: Get version info
|
|
||||||
id: info
|
|
||||||
working-directory: repo
|
|
||||||
run: |
|
|
||||||
echo "date=$(date -u '+%Y-%m-%d')" >> $GITHUB_OUTPUT
|
|
||||||
echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
||||||
echo "jar=$(ls target/*.jar | head -1)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Create release
|
|
||||||
id: release
|
|
||||||
run: |
|
|
||||||
RESPONSE=$(curl -s -X POST \
|
|
||||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases" \
|
|
||||||
-d "{
|
|
||||||
\"tag_name\": \"autobuild-${{ steps.info.outputs.date }}-${{ steps.info.outputs.sha }}\",
|
|
||||||
\"name\": \"Autobuild ${{ steps.info.outputs.date }} (${{ steps.info.outputs.sha }})\",
|
|
||||||
\"body\": \"Automated daily build from commit ${{ steps.info.outputs.sha }}.\",
|
|
||||||
\"prerelease\": true,
|
|
||||||
\"draft\": false
|
|
||||||
}")
|
|
||||||
echo "release_id=$(echo $RESPONSE | grep -o '\"id\":[0-9]*' | head -1 | cut -d: -f2)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Upload JAR to release
|
|
||||||
working-directory: repo
|
|
||||||
run: |
|
|
||||||
JAR="${{ steps.info.outputs.jar }}"
|
|
||||||
FILENAME=$(basename "$JAR")
|
|
||||||
curl -s -X POST \
|
|
||||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
|
||||||
-H "Content-Type: application/java-archive" \
|
|
||||||
--data-binary @"$JAR" \
|
|
||||||
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/${{ steps.release.outputs.release_id }}/assets?name=$FILENAME"
|
|
||||||
Reference in new issue
Block a user