diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml deleted file mode 100644 index 74af63a..0000000 --- a/.github/workflows/docker-publish.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Docker Publish - -on: - push: - branches: - - 'master' - -env: - JAVA_VERSION: 19 - -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@v2 - with: - fetch-depth: 0 - - name: Build and Publish Docker Image - env: - ORG_REGISTRY_USER: ${{ secrets.ORG_REGISTRY_USER }} - ORG_REGISTRY_PASSWORD: ${{ secrets.ORG_REGISTRY_PASSWORD }} - BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }} - run: ./gradlew jib - - name: Re-Deploy - run: "curl -H 'Authorization: Bearer ${{ secrets.ORG_WATCHTOWER_TOKEN }}' https://togetherjava.org:5003/v1/update" diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..c0891de --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,29 @@ +when: + branch: + - master + event: push + +steps: + publish: + image: eclipse-temurin:21-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