Some changes
This commit is contained in:
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@ -24,7 +24,9 @@ jobs:
|
||||
# echo "##[set-output name=version;]VERSION=${GITHUB_REF#$"refs/tags/v"}"
|
||||
# echo "##[set-output name=version_tag;]$GITHUB_REPOSITORY:${GITHUB_REF#$"refs/tags/v"}"
|
||||
# echo "##[set-output name=latest_tag;]$GITHUB_REPOSITORY:latest"
|
||||
|
||||
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
||||
echo REPO_VERSION=${GITHUB_REF_NAME#v} >> $GITHUB_OUTPUT
|
||||
echo "RELEASE_DATE=$(date --rfc-3339=date)" >> ${GITHUB_ENV}
|
||||
# - name: Print Version
|
||||
# run: |
|
||||
# echo ${{steps.version_step.outputs.version_tag}}
|
||||
@ -63,6 +65,7 @@ jobs:
|
||||
push: true
|
||||
tags: |
|
||||
docker.savin.nyc/${{ github.event.repository.name }}:latest
|
||||
# ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}
|
||||
|
||||
|
||||
# latest
|
||||
|
36
.github/workflows/deploy.yml
vendored
Normal file
36
.github/workflows/deploy.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
name: Deploy Project
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [develop]
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
# - '.github/**'
|
||||
pull_request:
|
||||
branches: [develop]
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
# - '.github/**'
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup SSH
|
||||
shell: bash
|
||||
run: |
|
||||
eval `ssh-agent -s`
|
||||
mkdir -p /home/runner/.ssh/
|
||||
touch /home/runner/.ssh/id_rsa
|
||||
echo -e "${{secrets.SSH_KEY}}" > /home/runner/.ssh/id_rsa
|
||||
chmod 700 /home/runner/.ssh/id_rsa
|
||||
ssh-keyscan -t rsa,dsa,ecdsa,ed25519 ${{secrets.SSH_HOST}} >> /home/runner/.ssh/known_hosts
|
||||
|
||||
- name: SSH to the Prod env
|
||||
shell: bash
|
||||
run: |
|
||||
ssh gitea@${{secrets.SSH_HOST}}
|
||||
whoiam
|
4
.github/workflows/testing.yml
vendored
4
.github/workflows/testing.yml
vendored
@ -9,11 +9,15 @@ jobs:
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- run: |
|
||||
go get -u .
|
||||
go test ./.
|
||||
|
Reference in New Issue
Block a user