diff --git a/.drone.yml b/.drone.yml index 0ac6ec2..f53cadd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -41,7 +41,7 @@ steps: - refs/tags/** # Build containers from main branch -- name: build +- name: build-gitea image: thegeeklab/drone-docker-buildx privileged: true settings: @@ -56,16 +56,46 @@ steps: - linux/arm64 - linux/amd64 -- name: release +- name: build-github + image: thegeeklab/drone-docker-buildx + privileged: true + settings: + provenance: false + registry: ghcr.io + username: + from_secret: docker_username + password: + from_secret: github_token + repo: ghcr.io/mrmeeb/cronicle + platforms: + - linux/arm64 + - linux/amd64 + +- name: release-gitea image: goreleaser/goreleaser environment: GITEA_TOKEN: from_secret: gitea_token commands: - - goreleaser release + - goreleaser release -f .goreleaser-gitea.yaml when: ref: - refs/tags/** + depends_on: + - build-gitea + +- name: release-github + image: goreleaser/goreleaser + environment: + GITHUB_TOKEN: + from_secret: github_token + commands: + - goreleaser release -f .goreleaser-github.yaml + when: + ref: + - refs/tags/** + depends_on: + - build-github - name: notify image: plugins/slack @@ -76,6 +106,9 @@ steps: settings: webhook: from_secret: slack_webhook + depends_on: + - release-gitea + - release-github --- kind: pipeline @@ -100,7 +133,7 @@ steps: - echo -n "develop-${DRONE_COMMIT_SHA:0:8}, develop" > .tags # Build containers from develop branch -- name: build +- name: build-gitea image: thegeeklab/drone-docker-buildx privileged: true settings: @@ -115,6 +148,21 @@ steps: - linux/arm64 - linux/amd64 +- name: build-github + image: thegeeklab/drone-docker-buildx + privileged: true + settings: + provenance: false + registry: ghcr.io + username: + from_secret: docker_username + password: + from_secret: github_token + repo: ghcr.io/mrmeeb/cronicle + platforms: + - linux/arm64 + - linux/amd64 + - name: notify image: plugins/slack when: @@ -123,4 +171,7 @@ steps: - failure settings: webhook: - from_secret: slack_webhook \ No newline at end of file + from_secret: slack_webhook + depends_on: + - build-gitea + - build-github \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1479fe9..0b8961c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -dist/ +dist-gitea/ +dist-github/ .tags \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser-gitea.yaml similarity index 95% rename from .goreleaser.yaml rename to .goreleaser-gitea.yaml index 4adcd4c..269d860 100644 --- a/.goreleaser.yaml +++ b/.goreleaser-gitea.yaml @@ -1,3 +1,5 @@ +dist: dist-gitea + build: skip: true diff --git a/.goreleaser-github.yaml b/.goreleaser-github.yaml new file mode 100644 index 0000000..da02521 --- /dev/null +++ b/.goreleaser-github.yaml @@ -0,0 +1,20 @@ +dist: dist-github + +build: + skip: true + +archives: +- format: binary + +release: + draft: true + github: + owner: MrMeeb + name: cronicle-docker + +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' \ No newline at end of file