This commit is contained in:
parent
c9483465b0
commit
4c23cecc5c
2 changed files with 3 additions and 10 deletions
89
.github/workflows/gitea-local.yaml
vendored
89
.github/workflows/gitea-local.yaml
vendored
|
|
@ -1,89 +0,0 @@
|
|||
name: Gitea Action
|
||||
|
||||
run-name: Build ${{ github.actor }}
|
||||
|
||||
# Intended for local gitea instance only.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
REGISTRY: ${{ vars.CONTAINER_REGISTRY }}
|
||||
REGISTRY_USERNAME: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
|
||||
REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
|
||||
CONTAINER_IMAGE_NAME: ${{ vars.CONTAINER_REGISTRY }}/${{ vars.CONTAINER_IMAGE_OWNER }}/${{ vars.CONTAINER_IMAGE_NAME }}:latest
|
||||
jobs:
|
||||
gitea-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ env.REGISTRY_USERNAME }}
|
||||
password: ${{ env.REGISTRY_PASSWORD }}
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
config-inline: |
|
||||
[registry."${{ env.REGISTRY }}"]
|
||||
ca=["/etc/ssl/certs/ca-certificates.crt"]
|
||||
- name: Build and Push Docker Image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
tags: ${{ env.CONTAINER_IMAGE_NAME }}
|
||||
push: true
|
||||
- name: Remote Deploy Development
|
||||
uses: appleboy/ssh-action@v1.2.1
|
||||
with:
|
||||
host: ${{ vars.SSH_DEVELOPMENT_HOST }}
|
||||
port: ${{ vars.SSH_DEVELOPMENT_PORT }}
|
||||
username: ${{ secrets.SSH_DEVELOPMENT_USER }}
|
||||
password: ${{ secrets.SSH_DEVELOPMENT_PASSWORD }}
|
||||
script: eval "${{ secrets.SSH_DEVELOPMENT_DEPLOY_CMD }}" & wait
|
||||
- name: Remote Deploy Test
|
||||
uses: appleboy/ssh-action@v1.2.1
|
||||
with:
|
||||
host: ${{ vars.SSH_TEST_HOST }}
|
||||
port: ${{ vars.SSH_TEST_PORT }}
|
||||
username: ${{ secrets.SSH_TEST_USER }}
|
||||
password: ${{ secrets.SSH_TEST_PASSWORD }}
|
||||
script: eval "${{ secrets.SSH_TEST_DEPLOY_CMD }}" & wait
|
||||
- name: Notify Discord Success
|
||||
if: success()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" -X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "✅ Gitea Local Deployment Success!",
|
||||
"description": "**Details:**\n- Image: `${{ env.CONTAINER_IMAGE_NAME }}`\n- Deployed by: `${{ github.actor }}`",
|
||||
"color": 3066993,
|
||||
"footer": {
|
||||
"text": "Gitea Local Release Notification",
|
||||
"icon_url": "https://example.com/success-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
- name: Notify Discord Failure
|
||||
if: failure()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" -X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "❌ Gitea Local Deployment Failed!",
|
||||
"description": "**Details:**\n- Image: `${{ env.CONTAINER_IMAGE_NAME }}`\n- Attempted by: `${{ github.actor }}`",
|
||||
"color": 15158332,
|
||||
"footer": {
|
||||
"text": "Gitea Local Release Notification",
|
||||
"icon_url": "https://example.com/failure-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
24
.github/workflows/spellcheck.yaml
vendored
24
.github/workflows/spellcheck.yaml
vendored
|
|
@ -1,24 +0,0 @@
|
|||
name: Spelling
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
|
||||
env:
|
||||
CLICOLOR: 1
|
||||
|
||||
jobs:
|
||||
spelling:
|
||||
name: Spell Check with Typos
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Spell Check Repo
|
||||
uses: crate-ci/typos@v1.29.9
|
||||
with:
|
||||
files: ./src
|
||||
Loading…
Add table
Add a link
Reference in a new issue