Atualizando para usar gitea
This commit is contained in:
55
.gitea/workflows/on_release.yml
Normal file
55
.gitea/workflows/on_release.yml
Normal file
@@ -0,0 +1,55 @@
|
||||
name: Creates a docker image for production
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
build_docker:
|
||||
name: Build the docker image
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Log in to Nexus Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: docker.nexus.makecodes.dev
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: docker.nexus.makecodes.dev/mines/frontend
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
- name: Deploy to production server
|
||||
run: |
|
||||
TOKEN=$(curl --silent --location 'https://auth.makecodes.dev/auth' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data '{
|
||||
"email": "'$USERNAME'",
|
||||
"password": "'$PASSWORD'"
|
||||
}' | jq -r '.token')
|
||||
# curl --location --silent 'https://deployer.makecodes.dev/deploy' \
|
||||
# --header 'Content-Type: application/json' \
|
||||
# --header "Authorization: Bearer $TOKEN" \
|
||||
# --data '{
|
||||
# "image": "docker.nexus.makecodes.dev/mines/frontend",
|
||||
# "service": "mines_frontend",
|
||||
# "version": "${{ github.ref_name }}",
|
||||
# "pipeline": "${{ github.run_number }}",
|
||||
# "repository": "mines/frontend"
|
||||
# }'
|
||||
env:
|
||||
USERNAME: ${{ secrets.SERVER_AUTH_USERNAME }}
|
||||
PASSWORD: ${{ secrets.SERVER_AUTH_PASSWORD }}
|
||||
40
.github/release-drafter.yml
vendored
40
.github/release-drafter.yml
vendored
@@ -1,40 +0,0 @@
|
||||
name-template: 'v$RESOLVED_VERSION'
|
||||
tag-template: 'v$RESOLVED_VERSION'
|
||||
categories:
|
||||
- title: '🚀 Features'
|
||||
label: 'feature'
|
||||
- title: '🛠 Maintenance'
|
||||
label: 'maintenance'
|
||||
- title: '🐛 Bug Fixes'
|
||||
label: 'bug'
|
||||
version-resolver:
|
||||
major:
|
||||
labels:
|
||||
- 'major'
|
||||
minor:
|
||||
labels:
|
||||
- 'feature'
|
||||
patch:
|
||||
labels:
|
||||
- 'maintenance'
|
||||
- 'bug'
|
||||
default: patch
|
||||
replacers:
|
||||
- search: '/([A-Z]{2,5}-\d{1,6})/g'
|
||||
replace: '[$1](https://imakecodes.atlassian.net/browse/$1)'
|
||||
autolabeler:
|
||||
- label: 'maintenance'
|
||||
title:
|
||||
- '/^chore.+/i'
|
||||
- label: 'bug'
|
||||
title:
|
||||
- '/^fix.+/i'
|
||||
- label: 'feature'
|
||||
title:
|
||||
- '/^feat.+/i'
|
||||
- label: 'major'
|
||||
title:
|
||||
- '/^[a-zA-Z]+(\(.*?\))?!:.+/i'
|
||||
template: |
|
||||
## What’s Changed
|
||||
$CHANGES
|
||||
64
.github/workflows/on_release.yml
vendored
64
.github/workflows/on_release.yml
vendored
@@ -1,64 +0,0 @@
|
||||
name: Creates a docker image for production
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Build started
|
||||
uses: voxmedia/github-action-slack-notify-build@v1
|
||||
if: success()
|
||||
with:
|
||||
channel: ci-notifications
|
||||
status: STARTED
|
||||
color: good
|
||||
env:
|
||||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
||||
with:
|
||||
images: redbeard/mines-frontend
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
||||
env:
|
||||
SCOPE: production
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
- name: executing remote ssh commands using password
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
script: |
|
||||
cd /media/data/apps/mines-frontend
|
||||
docker pull redbeard/mines-frontend:latest
|
||||
docker-compose up -d frontend
|
||||
docker image prune -f
|
||||
- name: Build finished
|
||||
if: success()
|
||||
uses: voxmedia/github-action-slack-notify-build@v1
|
||||
with:
|
||||
channel: ci-notifications
|
||||
status: SUCCESS
|
||||
color: good
|
||||
env:
|
||||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
||||
16
.github/workflows/release-drafter-releaser.yml
vendored
16
.github/workflows/release-drafter-releaser.yml
vendored
@@ -1,16 +0,0 @@
|
||||
name: Release Drafter
|
||||
on:
|
||||
push:
|
||||
# branches to consider in the event; optional, defaults to all
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
update_release_draft:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Drafts your next Release notes as Pull Requests are merged into "master"
|
||||
- uses: release-drafter/release-drafter@v5
|
||||
# with:
|
||||
# disable-autolabeler: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user