From ef574ec8e3ce389576d1d696a42753b5abbf8db0 Mon Sep 17 00:00:00 2001 From: lauralani Date: Fri, 5 May 2023 09:25:24 +0200 Subject: [PATCH] add docker tag deploy pipeline --- .dockerignore | 38 +++++++++++++++++++++++++++++++++++ .gitignore | 4 +++- .woodpecker/deploy-docker.yml | 18 +++++++++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..f500267 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,38 @@ +# flyctl launch added from .gitignore +# ---> Go +# If you prefer the allow list template instead of the deny list, see community template: +# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# +# Binaries for programs and plugins +**/*.exe +**/*.exe~ +**/*.dll +**/*.so +**/*.dylib + +# Test binary, built with `go test -c` +**/*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +**/*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +**/go.work + +**/.idea + +# flyctl launch added from .idea/.gitignore +# Default ignored files +.idea/shelf +.idea/workspace.xml +# Editor-based HTTP Client requests +.idea/httpRequests +# Datasource local storage ignored files +.idea/dataSources +.idea/dataSources.local.xml +fly.toml +examples/ +.woodpecker/ diff --git a/.gitignore b/.gitignore index 22952ec..503a584 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,6 @@ # Go workspace file go.work -.idea/ \ No newline at end of file +.idea/ + +fly.toml \ No newline at end of file diff --git a/.woodpecker/deploy-docker.yml b/.woodpecker/deploy-docker.yml index 4258e49..905205c 100644 --- a/.woodpecker/deploy-docker.yml +++ b/.woodpecker/deploy-docker.yml @@ -4,6 +4,9 @@ when: pipeline: docker-deploy-push: + when: + event: + - push image: woodpeckerci/plugin-docker-buildx settings: dockerfile: Dockerfile @@ -12,5 +15,20 @@ pipeline: registry: codeberg.org tags: latest username: lauralani + password: + from_secret: codeberg_token + + docker-deploy-tag: + when: + event: + - tag + image: woodpeckerci/plugin-docker-buildx + settings: + dockerfile: Dockerfile + platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le + repo: codeberg.org/lauralani/go-urlsh + registry: codeberg.org + auto_tag: true + username: lauralani password: from_secret: codeberg_token \ No newline at end of file