diff --git a/.forgejo/workflows/docker-image.yml b/.forgejo/workflows/docker-image.yml new file mode 100644 index 0000000..d8de2b1 --- /dev/null +++ b/.forgejo/workflows/docker-image.yml @@ -0,0 +1,45 @@ +name: Publish Docker image +on: + push: + branches: + - main + +jobs: + push_to_registry: + name: Push Docker image to Forgejo Packages + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + git.wbrawner.com/wbrawner/twigs + tags: | + type=schedule + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: git.wbrawner.com + username: ${{ github.actor }} + password: ${{ secrets.FORGEJO_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.forgejo/workflows/pull-request.yml b/.forgejo/workflows/pull-request.yml new file mode 100644 index 0000000..8ff7105 --- /dev/null +++ b/.forgejo/workflows/pull-request.yml @@ -0,0 +1,26 @@ +name: Pull request workflow +on: pull_request + +jobs: + test: + name: Build and Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: https://git.wbrawner.com/actions/setup-java@v4 + with: + distribution: temurin + java-version: 17 + - name: Validate Gradle Wrapper + uses: https://git.wbrawner.com/gradle/actions/wrapper-validation@v3 + - name: Build with Gradle + uses: https://git.wbrawner.com/gradle/actions/setup-gradle@v3 + with: + arguments: --stacktrace check + - name: Publish JUnit Results + uses: actions/upload-artifact@v3 + if: always() + with: + name: Unit Test Results + path: "*/build/test-results/test/*.xml" + if-no-files-found: error diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index e075815..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "gradle" - directory: "/" - schedule: - interval: "weekly" diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml deleted file mode 100644 index 755164b..0000000 --- a/.github/workflows/auto-merge.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Enable Auto Merge -on: - pull_request_target: - types: - - opened - - reopened - - edited - branches: - - main - -jobs: - auto-merge: - runs-on: ubuntu-latest - if: ${{ github.actor == 'wbrawner' || github.actor == 'dependabot[bot]' }} - steps: - - name: Enable auto-merge - run: gh pr merge --auto --rebase "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.GH_TOKEN}} -