added drone.yml file

This commit is contained in:
2022-04-22 00:41:37 +05:30
parent 7ee8d3b133
commit 3ee664b9a3
3 changed files with 10 additions and 196 deletions
+10
View File
@@ -0,0 +1,10 @@
kind: pipeline
type: docker
name: default
steps:
- name: greeting
image: alpine
commands:
- echo hello
- echo world
-157
View File
@@ -1,157 +0,0 @@
---
name: ciandcd
on:
# we want pull requests so we can build(test) but not push to image registry
pull_request:
branches:
- 'main'
# only build when important files change
paths-ignore:
# - 'README.md'
# - '.github/workflows/linter.yml'
- '.github/**'
- 'nginx/**'
- 'docker-compose.yml'
- 'docker-compose.dev.yml'
- 'docker-compose.prod.yml'
push:
branches:
- 'main'
# only build when important files change
paths-ignore:
- '.github/**'
- 'nginx/**'
- 'docker-compose.yml'
- 'docker-compose.dev.yml'
- 'docker-compose.prod.yml'
workflow_dispatch:
# run whenever we want!
workflow_call:
# allow reuse of this workflow in other repos
inputs:
dockerhub-enable:
description: Log in and push to Docker Hub
required: false
type: boolean
default: true
dockerhub-username:
description: Docker Hub username
required: false
type: string
default: buzzerburger
context:
description: Docker context (path) to start build from
required: false
type: string
default: .
target:
description: Build stage to target
required: false
type: string
file:
description: Name of Dockerfile (in relation to context path)
required: false
type: string
platforms:
description: Platforms to build for
required: false
type: string
default: linux/amd64,linux/arm64
image-names:
description: A list of the account/repo names for docker build
required: false
type: string
default: |
ghcr.io/buzzerburger/test
secrets:
dockerhub-token:
description: Docker Hub token
required: false
jobs:
laravel-tests:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
- uses: actions/checkout@v3
- name: Copy app/code/
run: |
cd app/code
composer install
php artisan test
build-and-push-images:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
# we need qemu and buildx so we can build multiple platforms later
name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1.2.0
-
# BuildKit (used with `docker buildx`) is the best way to build images
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
if: $${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v1
with:
username: buzzerburger
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GHCR
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
# -
# name: Docker meta
# id: docker_meta
# uses: docker/metadata-action@v3.6.2
# with:
# # list of Docker images to use as base name for tags
# images: ${{ inputs.image-names }}
# flavor: |
# latest=false
# tags: |
# type=raw,value=latest
-
# this will build the images, once per platform,
# then push to both Docker Hub and GHCR
name: Docker Build and Push
if: ${{ github.event_name != 'pull_request' }}
id: docker_build_and_push
uses: docker/build-push-action@v2
with:
platforms: linux/amd64
context: app
builder: ${{ steps.buildx.outputs.name }}
# it uses github cache API for faster builds:
# https://github.com/crazy-max/docker-build-push-action/blob/master/docs/advanced/cache.md#cache-backend-api
cache-from: type=gha
cache-to: type=gha,mode=max
# for an approved pull_request, only push pr-specific tags
push: ${{ github.event_name != 'pull_request' }}
tags: buzzerburger/test:latest
# labels: ${{ steps.docker_meta.outputs.labels }}
-
name: Show image digest
run: echo ${{ steps.docker_build_and_push.outputs.digest }}
-39
View File
@@ -1,39 +0,0 @@
-----BEGIN RSA PRIVATE KEY-----
MIIG5AIBAAKCAYEAuRSeR/ljTrlqnbLLJjV989kFOqLKZSAoJnzFbhMaL/l0fYFR
U8PWln90/UctAuz6ly5LELKXPU9NEzkW+KyMyiUrO97eG/oHI+FhuUS78v0hSZTR
U4eybpKrH4KhtTYMyfzobBc5J2G+mhaxE5GuPF0kJYDx75WR//sWNzyhUnrKHnDR
YR8Ryg8oG7DFtx4TtfCKVqC9n3bC8PjAN5Glh0/Jrukcl6fl1+Ak9GzAMAnq+2C/
PXhVJd0cp6+EPZ84Vic1BgUZutfsONxnupK2TiZjP+MUbhE7vdFiCuFQODPhKjv5
aHcAdAo/E0+ee1I0sfOwl44rYV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