Remove Docker and Golang build workflows
This commit is contained in:
parent
9e71dc47db
commit
f2a11e0378
@ -1,21 +1,46 @@
|
||||
name: Actions Build Docker Image
|
||||
name: Actions Build Binary
|
||||
run-name: ${{ gitea.actor }} is building new image 🚀
|
||||
on:
|
||||
push:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- "Build-Binary"
|
||||
types:
|
||||
- completed
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
Build-Binary:
|
||||
runs-on: soaska
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- name: Install Node.js, curl and go
|
||||
run: |
|
||||
apk add --no-cache nodejs curl go git
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
- name: Install go dependencies
|
||||
run: |
|
||||
go mod download
|
||||
- name: Build Binary
|
||||
run: |
|
||||
go build -o $(basename ${{ gitea.repository }}) .
|
||||
env:
|
||||
ENVIRONMENT: production
|
||||
- name: Upload binary to soaska.ru
|
||||
run: |
|
||||
package_name=$(basename ${{ gitea.repository }})
|
||||
branch_name=$(git rev-parse --abbrev-ref HEAD)
|
||||
current_date: $(git log -1 --format=%cd --date=format:'%Y-%m-%d-%H-%M-%S')
|
||||
curl --user ${{ secrets.username }}:${{ secrets.password }} \
|
||||
--upload-file $package_name \
|
||||
https://soaska.ru/api/packages/${{ secrets.username }}/generic/$package_name-$branch_name/$current_date/$package_name
|
||||
env:
|
||||
ENVIRONMENT: production
|
||||
Build-Docker-Image:
|
||||
runs-on: soaska
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- name: Install Node.js and curl
|
||||
run: |
|
||||
apk add --no-cache nodejs curl
|
||||
apk add --no-cache nodejs curl git
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: List files in the repository
|
@ -1,36 +0,0 @@
|
||||
name: Actions Build Binary
|
||||
run-name: ${{ gitea.actor }} is building new image 🚀
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
Build-Binary:
|
||||
runs-on: soaska
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- name: Install Node.js, curl and go
|
||||
run: |
|
||||
apk add --no-cache nodejs curl go
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
- name: Install go dependencies
|
||||
run: |
|
||||
go mod download
|
||||
- name: Build Binary
|
||||
run: |
|
||||
go build -o $(basename ${{ gitea.repository }}) .
|
||||
env:
|
||||
ENVIRONMENT: production
|
||||
- name: Upload binary to soaska.ru
|
||||
run: |
|
||||
package_name=$(basename ${{ gitea.repository }})
|
||||
branch_name=$(git rev-parse --abbrev-ref HEAD)
|
||||
current_date: $(git log -1 --format=%cd --date=format:'%Y-%m-%d-%H-%M-%S')
|
||||
curl --user ${{ secrets.username }}:${{ secrets.password }} \
|
||||
--upload-file $package_name \
|
||||
https://soaska.ru/api/packages/${{ secrets.username }}/generic/$package_name-$branch_name/$current_date/$package_name
|
||||
env:
|
||||
ENVIRONMENT: production
|
Loading…
Reference in New Issue
Block a user