diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..38b1bd3 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,56 @@ +kind: pipeline +name: default + +x-build-docker-image: &x-build-docker-image + image: plugins/docker + settings: + tags: + - ${DRONE_COMMIT_BRANCH}-${DRONE_COMMIT_SHA:0:7} + - latest + username: + from_secret: docker_username + password: + from_secret: docker_password + +steps: +- name: publish_linux_amd64 + <<: *x-build-docker-image + settings: + repo: minghsu0107/update-kustomization + dockerfile: Dockerfile + depends_on: + - clone + when: + event: + - push + +trigger: + branch: + - main +--- +kind: pipeline +type: docker +name: release + +platform: + os: linux + arch: amd64 + +x-build-docker-image: &x-build-docker-image + image: plugins/docker + settings: + tags: + - ${DRONE_TAG} + username: + from_secret: docker_username + password: + from_secret: docker_password +steps: +- name: publish_release + <<: *x-build-docker-image + settings: + repo: minghsu0107/update-kustomization + dockerfile: Dockerfile + when: + event: + - tag \ No newline at end of file diff --git a/README.md b/README.md index 228ebd8..f6ec5a7 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ name: update-kustomization steps: - name: kustomization pull: if-not-exists - image: minghsu0107/update-kustomization:v1.0.3 + image: minghsu0107/update-kustomization environment: SSH_KEY: from_secret: ssh_key