Testing workflow
Some checks failed
Gitea Actions Demo / Post-startup-message (push) Has been cancelled

This commit is contained in:
Luke R 2024-05-02 11:42:04 -07:00
parent ce36281fee
commit 5971add9c1
3 changed files with 15 additions and 69 deletions

View File

@ -0,0 +1,15 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Post-startup-message:
runs-on: appleboy/drone-discord
env:
WEBHOOK_ID=${{ secrets.WEBHOOK_ID }}
WEBHOOK_TOKEN=${{ secrets.WEBHOOK_TOKEN }}
WAIT=false
TTS=false
USERNAME=test
AVATAR_URL=https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTP3ekDW_jiUIEmAym337xeS7WN-k_DUq8YHi6VVfwQQw&s
MESSAGE=🚀 Pipeline [[#{{build.number}}]({{build.link}})] of branch [{{commit.branch}}]({{commit.link}}) by ${DRONE_COMMIT_AUTHOR_NAME} has started

View File

@ -1,58 +0,0 @@
image: docker:dind
services:
- name: docker:dind
entrypoint: ["env", "-u", "DOCKER_HOST"]
command: ["dockerd-entrypoint.sh"]
variables:
DOCKER_TLS_CERTDIR: ""
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
stages:
- lint_python
- lint_helm
- deploy
lint_helm:
image: alpine/helm
stage: lint_helm
script:
- helm lint ./helm
rules:
- changes:
- helm/*
lint_python:
image: python:alpine
stage: lint_python
script:
- pip install -q black && black --fast --check .
rules:
- changes:
- app/**/*
build_and_push_container:
stage: deploy
script:
- echo "Wait for Docker daemon at tcp://localhost:2375"
- while ! nc -z localhost 2375; do sleep 0.1; done # Wait until docker socket is available
- docker login -u ldooks -p $DOCKER_ACCESS_TOKEN
- docker build --platform linux/amd64 -t ldooks/dragon-bot:$CI_PIPELINE_IID -t ldooks/dragon-bot:latest .
- docker push ldooks/dragon-bot -a
rules:
- changes:
- app/**/*
- Dockerfile
sync_argo:
stage: .post
image: python:alpine
script:
- apk add --no-cache jq curl
- latest=$(curl -sL https://api.github.com/repos/argoproj/argo-cd/releases/latest | jq -r '.assets[] | select( .name | contains("argocd-linux-amd64")).browser_download_url')
- curl -Ls $latest -o /tmp/argocd && chmod +x /tmp/argocd
- /tmp/argocd --insecure --server argocd-server.argocd.svc.cluster.local --auth-token $ARGOCD_TOKEN app set dragon-bot --helm-set image.tag=$CI_PIPELINE_IID
rules:
- changes:
- helm/*
- app/**/*

View File

@ -1,11 +0,0 @@
### New Merge Request
- What?
* `briefly describe the issue this is fixing`
- How?
* `briefly describe what this PR is doing to remedy the issue`
- Why?
* `is there an open issue associated with this PR? if so, reference it with #56 (or whatever the issue number is)`
- Is it...?
* [ ] Based?
* [ ] Dale-pilled?