commit 99b2e7667ff53a0477441dbca2ca96d96f229156 Author: Aaron Guise Date: Wed Apr 3 12:02:53 2024 +1300 feat: Initial commit :tada: diff --git a/.release.yml b/.release.yml new file mode 100644 index 0000000..b5ea071 --- /dev/null +++ b/.release.yml @@ -0,0 +1,28 @@ +release: "gitea" +gitea: + repo: "docker-go-semantic-release" + user: "cybercinch" + url: "https://hub.cybercinch.nz" +commitFormat: angular +branch: + main: release +assets: [] + # - path: ./build/go-semantic-release.linux_amd64 + # compress: true + # - path: ./build/go-semantic-release.linux_arm64 + # compress: true + # - path: ./build/go-semantic-release.windows_i386.exe + # compress: true + # - path: ./build/go-semantic-release.windows_amd64.exe + # compress: true + # - path: ./build/go-semantic-release.darwin_amd64 + # compress: true +changelog: + docker: + latest: true + repository: hub.cybercinch.nz/cybercinch/docker-go-sem-release + showAuthors: false + +hooks: + preRelease: [] + postRelease: [] \ No newline at end of file diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..c6e0599 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,77 @@ +variables: + - &platforms 'linux/arm64,linux/amd64' + - &docker_creds + username: + from_secret: hub_username_cybercinch + password: + from_secret: docker_password_cybercinch + - &pypi_creds + username: + from_secret: hub_username_cybercinch + password: + from_secret: docker_password_cybercinch + - build_args: &build_args + - TAG: ${CI_COMMIT_TAG} +clone: + git: + image: woodpeckerci/plugin-git + settings: + partial: false + tags: true + +steps: + build-release: + image: docker.io/cybercinch/go-semrelease:golang1.20 + pull: true + commands: + - go-semantic-release release # Actually make the release on Gitea. + environment: + GITEA_TOKEN: + from_secret: gitea_token + GITEA_URL: + from_secret: gitea_server_url + when: + branch: ${CI_REPO_DEFAULT_BRANCH} + event: + - push + - manual + + publish-docker-tagged: + image: woodpeckerci/plugin-docker-buildx + pull: true + settings: + <<: *docker_creds + registry: hub.cybercinch.nz + repo: hub.cybercinch.nz/cybercinch/${CI_REPO_NAME} + dockerfile: Dockerfile + platforms: *platforms + build_args: + - TAG=${CI_COMMIT_TAG} + tags: + - latest + - ${CI_COMMIT_TAG} + when: + branch: ${CI_REPO_DEFAULT_BRANCH} + event: + - tag + + # publish-docker-develop: + # image: docker.io/cybercinch/woodpecker-plugin-depot + # pull: true + # settings: + # <<: *docker_creds + # token: + # from_secret: depot_token + # repohost: hub.cybercinch.nz + # repo: cybercinch/${CI_REPO_NAME} + # project: + # from_secret: depot_project + # dockerfile: Dockerfile.dev + # push: true + # platforms: linux/amd64 + # tags: ["develop"] + # when: + # branch: develop + # event: + # - push + # - manual diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e79b311 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM golang:1.20 +ARG TARGETPLATFORM +ARG GOSEMREL_VERSION=v2.2.12 +# Strip out the prefix +ENV PLAT=${TARGETPLATFORM//"linux/"/} + +# Grab Copy of go-semantic-release +ADD https://hub.cybercinch.nz/cybercinch/go-semantic-release/releases/download/${GOSEMREL_VERSION}/go-semantic-release.linux_${PLAT}.zip /tmp +RUN apt-get update && apt-get install -y --no-recommends unzip && \ + unzip -d /tmp /tmp/go-semantic-release.linux_${PLAT}.zip && \ + mv /tmp/go-semantic-release.linux_${PLAT} /usr/local/bin/go-semantic-release && \ + rm -f /tmp/go-semantic-release.linux_${PLAT}.zip