diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml deleted file mode 100644 index b78064ff15..0000000000 --- a/.github/workflows/docker-publish.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: Docker Publish - -on: - push: - branches: - - 'develop' - - 'master' - -env: - JAVA_VERSION: 25 - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Set up JDK - uses: actions/setup-java@v1 - with: - java-version: ${{ env.JAVA_VERSION }} - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Build and Publish Docker Image - env: - REGISTRY_USER: ${{ secrets.REGISTRY_USER }} - REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} - BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }} - run: ./gradlew jib - - name: Re-Deploy - run: "curl -H 'Authorization: Bearer ${{ secrets.WATCHTOWER_TOKEN }}' https://togetherjava.org:5003/v1/update" diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000000..32884c68ca --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,30 @@ +when: + branch: + - develop + - master + event: push + +steps: + publish: + image: eclipse-temurin:25-jdk + environment: + REGISTRY_USER: + from_secret: REGISTRY_USER + REGISTRY_PASSWORD: + from_secret: REGISTRY_PASSWORD + BRANCH_NAME: ${CI_COMMIT_BRANCH} + commands: + - echo ${CI_COMMIT_BRANCH} + - ./gradlew jib + + deploy: + image: alpine + depends_on: + - publish + environment: + WATCHTOWER_TOKEN: + from_secret: WATCHTOWER_TOKEN + commands: + - apk add --no-cache curl + - | + curl -H "Authorization: Bearer $WATCHTOWER_TOKEN" https://togetherjava.org:5003/v1/update