6 Commits

Author SHA1 Message Date
Kamesh 1d4f887128 feat!: prepare and push release 2022-07-11 19:46:47 +05:30
Kamesh 6cb81ef2d3 remove auto release of image 2022-07-11 13:14:03 +05:30
Kamesh Sampath 1563dc837e Merge pull request #3 from kameshsampath/release-please--branches--main--components--release-please-action
chore(main): release 0.0.2
2022-07-11 13:12:11 +05:30
github-actions[bot] 05a2b9a9c1 chore(main): release 0.0.2 2022-07-11 07:41:37 +00:00
Kamesh b7e9641585 fix: workflow 2022-07-11 13:11:17 +05:30
Kamesh a25ede7eae workflow id updated 2022-07-11 13:07:40 +05:30
4 changed files with 24 additions and 74 deletions
-41
View File
@@ -1,41 +0,0 @@
name: Release Image
on:
release:
types:
- "released"
workflow_dispatch:
env:
PLUGIN_IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/drone-vercel-deploy
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
id: docker-hub-login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Release Image
env:
TAG_NAME: ${{ github.event.release.tag_name }}
PLUGIN_IMAGE_NAME: ${{ env.PLUGIN_IMAGE_NAME }}
id: build and release plugin image
run: |
docker build \
--build-arg BUILDKIT_MULTI_PLATFORM=1 \
--platform=linux/amd64 \
--platform=linux/arm64 \
--push \
--tag $PLUGIN_IMAGE_NAME:$TAG \
-f docker/Dockerfile .
docker tag $PLUGIN_IMAGE_NAME:$TAG $PLUGIN_IMAGE_NAME
docker push $PLUGIN_IMAGE_NAME
-14
View File
@@ -1,14 +0,0 @@
on:
push:
branches:
- main
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: simple
package-name: release-please-action
bump-minor-pre-major: true
+7
View File
@@ -1,5 +1,12 @@
# Changelog
## [0.0.2](https://github.com/kameshsampath/drone-vercel-deploy/compare/v0.0.1...v0.0.2) (2022-07-11)
### Bug Fixes
* workflow ([b7e9641](https://github.com/kameshsampath/drone-vercel-deploy/commit/b7e9641585f1934e00add177a707ebb70eef3a39))
## [0.0.1](https://github.com/kameshsampath/drone-vercel-deploy/compare/v0.0.0...v0.0.1) (2022-07-11)
+17 -19
View File
@@ -1,28 +1,26 @@
IMAGE?=kameshsampath/drone-vercel-deploy
TAG?=latest
SHELL := bash
CURRENT_DIR = $(shell pwd)
PLUGIN_IMAGE_NAME := docker.io/kameshsampath/drone-vercel-deploy
DRONE_FILE = .drone.yml
ENV_FILE := $(CURRENT_DIR)/.env
BUILDER=buildx-multi-arch
DOCKER_FILE=$(CURRENT_DIR)/docker/Dockerfile
build-and-load: ## Builds and loads the image into local docker context
@docker buildx build \
--tag $(PLUGIN_IMAGE_NAME) \
--load \
-f "$(CURRENT_DIR)/docker/Dockerfile" "$(CURRENT_DIR)"
prepare-buildx: ## Create buildx builder for multi-arch build, if not exists
docker buildx inspect $(BUILDER) || docker buildx create --name=$(BUILDER) --driver=docker-container --driver-opt=network=host
deploy-and-test: build-and-load ## Builds, loads the image into local docker and tests
@drone exec --secret-file="examples/nextjs-blog/secret.local" examples/nextjs-blog/.drone.yml
build-plugin: ## Build plugin image locally
docker build --tag=$(IMAGE):$(shell svu next) -f $(DOCKER_FILE) .
build-and-push: ## Builds and pushes the image to Container Registry
@docker buildx build \
--build-arg BUILDKIT_MULTI_PLATFORM=1 \
--platform=linux/amd64 \
--platform=linux/arm64 \
--push \
--metadata-file="$(CURRENT_DIR)/docker/metadata.json" \
--tag $(PLUGIN_IMAGE_NAME) \
-f "$(CURRENT_DIR)/docker/Dockerfile" "$(CURRENT_DIR)"
push-plugin: prepare-buildx ## Build & Upload extension image to hub. Do not push if tag already exists: TAG=$(svu c) make push-extension
docker pull $(IMAGE):$(shell svu c) && echo "Failure: Tag already exists" || docker buildx build --push --builder=$(BUILDER) --platform=linux/amd64,linux/arm64 --build-arg TAG=$(shell svu c) --tag=$(IMAGE):$(shell svu c) -f $(DOCKER_FILE) .
release:
git tag "$(shell svu next)"
git push --tags
help: ## Show this help
@echo Please specify a build target. The choices are:
@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(INFO_COLOR)%-30s$(NO_COLOR) %s\n", $$1, $$2}'
.PHONY: build-and-load build-and-push
.PHONY: bin build-plugin push-plugin help