Remove github workflow and add drone (#49)

This commit is contained in:
Hussein Galal
2023-06-21 00:43:16 +03:00
committed by GitHub
parent da5ddb27b5
commit 861078fa85
3 changed files with 63 additions and 73 deletions
+63
View File
@@ -0,0 +1,63 @@
---
kind: pipeline
name: amd64
platform:
os: linux
arch: amd64
steps:
- name: build
image: rancher/dapper:v0.5.0
environment:
GITHUB_TOKEN:
from_secret: github_token
commands:
- dapper ci
volumes:
- name: docker
path: /var/run/docker.sock
- name: github_binary_release
image: ibuildthecloud/github-release:v0.0.1
settings:
api_key:
from_secret: github_token
prerelease: true
checksum:
- sha256
checksum_file: CHECKSUMsum-amd64.txt
checksum_flatten: true
files:
- "bin/*"
when:
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag
- name: docker-publish
image: plugins/docker
settings:
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: "rancher/k3k"
username:
from_secret: docker_username
when:
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag
volumes:
- name: docker
host:
path: /var/run/docker.sock
-32
View File
@@ -1,32 +0,0 @@
name: Chart Release
on:
push:
branches:
- main
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v3
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.5.0
with:
charts_dir: charts
env:
CR_TOKEN: "${{ secrets.TOKEN }}"
-41
View File
@@ -1,41 +0,0 @@
name: K3K Release
on:
push:
tags:
- "v*"
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build K3K
uses: addnab/docker-run-action@v3
with:
registry: docker.io
image: rancher/dapper:v0.5.5
options: -v ${{ github.workspace }}:/work
run: |
cd /work && dapper ci
- name: Publish Binaries
uses: galal-hussein/docker-run-action@dev
if: startsWith(github.ref, 'refs/tags/')
with:
registry: docker.io
image: ibuildthecloud/github-release:v0.0.1
options: -e GITHUB_TOKEN=${{ secrets.TOKEN }} -e GITHUB_RELEASE_PRERELEASE=true -e GITHUB_RELEASE_FILES='/work/bin/*' -v ${{ github.workspace }}:/work
- name: Docker Hub Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: husseingalal/k3k:${{ github.ref_name }}
file: ./package/Dockerfile
context: .