From ec018d2fb56519af5f2052d61a6c3f8dff0099ba Mon Sep 17 00:00:00 2001 From: SebClem Date: Mon, 1 Jan 2024 14:46:05 +0100 Subject: [PATCH] Move to woodpecker --- .github/release-drafter.yml | 4 --- .github/workflows/docker_dev.yml | 41 -------------------------- .github/workflows/docker_release.yml | 41 -------------------------- .github/workflows/release-drafter.yml | 26 ----------------- .woodpecker/docker_dev.yml | 42 +++++++++++++++++++++++++++ .woodpecker/realease.yml | 16 ++++++++++ 6 files changed, 58 insertions(+), 112 deletions(-) delete mode 100644 .github/release-drafter.yml delete mode 100644 .github/workflows/docker_dev.yml delete mode 100644 .github/workflows/docker_release.yml delete mode 100644 .github/workflows/release-drafter.yml create mode 100644 .woodpecker/docker_dev.yml create mode 100644 .woodpecker/realease.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index 27bcee3..0000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,4 +0,0 @@ -template: | - ## Whatโ€™s Changed - - $CHANGES diff --git a/.github/workflows/docker_dev.yml b/.github/workflows/docker_dev.yml deleted file mode 100644 index d68c643..0000000 --- a/.github/workflows/docker_dev.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Build Dev Docker - -on: - push: - branches-ignore: - - "renovate/**" - tags-ignore: - - "**" - -jobs: - build-docker: - runs-on: ubuntu-latest - steps: - - name: โฌ‡๏ธ Checkout - uses: actions/checkout@v3 - - - name: ๐Ÿ› ๏ธ Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: ๐Ÿ”’ Login to ghcr.io - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - 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@v3 - with: - push: true - context: . - tags: "ghcr.io/sebclem/claptrapbot-ui:${{ env.tag }}" - file: ./Dockerfile diff --git a/.github/workflows/docker_release.yml b/.github/workflows/docker_release.yml deleted file mode 100644 index 4e0acdd..0000000 --- a/.github/workflows/docker_release.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Build release Docker - -on: - push: - tags: - - "**" - -jobs: - build-docker: - runs-on: ubuntu-latest - steps: - - name: โฌ‡๏ธ Checkout - uses: actions/checkout@v3 - - - name: ๐Ÿ› ๏ธ Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: ๐Ÿ”’ Login to ghcr.io - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - 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@v3 - with: - push: true - context: . - tags: | - ghcr.io/sebclem/claptrapbot-ui:${{ env.tag }} - ghcr.io/sebclem/claptrapbot-ui:latest - file: ./Dockerfile diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml deleted file mode 100644 index 3807255..0000000 --- a/.github/workflows/release-drafter.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Release Drafter - -on: - push: - # branches to consider in the event; optional, defaults to all - branches: - - master - # pull_request event is required only for autolabeler - pull_request: - # Only following types are handled by the action, but one can default to all as well - types: [opened, reopened, synchronize] - -permissions: - contents: read - -jobs: - update_release_draft: - permissions: - contents: write # for release-drafter/release-drafter to create a github release - pull-requests: write # for release-drafter/release-drafter to add label to PR - runs-on: ubuntu-latest - steps: - # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: release-drafter/release-drafter@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.woodpecker/docker_dev.yml b/.woodpecker/docker_dev.yml new file mode 100644 index 0000000..b0bd289 --- /dev/null +++ b/.woodpecker/docker_dev.yml @@ -0,0 +1,42 @@ +when: + event: + - push + - pull_request + - manual + - tag + +steps: + build-only: + 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 + dry_run: true + logins: + - registry: https://git.sebclem.fr + username: + from_secret: docker_user + password: + from_secret: docker_token + 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] diff --git a/.woodpecker/realease.yml b/.woodpecker/realease.yml new file mode 100644 index 0000000..7f63fd4 --- /dev/null +++ b/.woodpecker/realease.yml @@ -0,0 +1,16 @@ +when: + event: tag +steps: + publish: + image: woodpeckerci/plugin-docker-buildx + settings: + platforms: linux/amd64 + auto_tag: true + repo: git.sebclem.fr/sebclem/${CI_REPO_NAME,,} + cache_from: git.sebclem.fr/sebclem/${CI_REPO_NAME,,} + logins: + - registry: https://git.sebclem.fr + username: + from_secret: docker_user + password: + from_secret: docker_token