More changes
This commit is contained in:
15
.github/workflows/build.yml
vendored
15
.github/workflows/build.yml
vendored
@ -12,22 +12,23 @@ on:
|
|||||||
- 'README.md'
|
- 'README.md'
|
||||||
# - '.github/**'
|
# - '.github/**'
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# needs: test
|
# needs: test
|
||||||
# if: startsWith(github.ref, 'refs/tags')
|
# if: startsWith(github.ref, 'refs/tags')
|
||||||
steps:
|
steps:
|
||||||
# - name: Extract Version
|
- name: Extract Version
|
||||||
# id: version_step
|
id: version_step
|
||||||
# run: |
|
run: |
|
||||||
|
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}
|
||||||
|
|
||||||
# echo "##[set-output name=version;]VERSION=${GITHUB_REF#$"refs/tags/v"}"
|
# 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=version_tag;]$GITHUB_REPOSITORY:${GITHUB_REF#$"refs/tags/v"}"
|
||||||
# echo "##[set-output name=latest_tag;]$GITHUB_REPOSITORY:latest"
|
# 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
|
# - name: Print Version
|
||||||
# run: |
|
# run: |
|
||||||
# echo ${{steps.version_step.outputs.version_tag}}
|
# echo ${{steps.version_step.outputs.version_tag}}
|
||||||
|
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
@ -22,11 +22,13 @@ jobs:
|
|||||||
- name: Setup SSH
|
- name: Setup SSH
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
whoiam
|
||||||
eval `ssh-agent -s`
|
eval `ssh-agent -s`
|
||||||
mkdir -p /home/runner/.ssh/
|
mkdir -p /home/runner/.ssh/
|
||||||
touch /home/runner/.ssh/id_rsa
|
touch /home/runner/.ssh/id_rsa
|
||||||
echo -e "${{secrets.SSH_KEY}}" > /home/runner/.ssh/id_rsa
|
echo -e "${{secrets.SSH_KEY}}" > /home/runner/.ssh/id_rsa
|
||||||
chmod 700 /home/runner/.ssh/id_rsa
|
chmod 700 /home/runner/.ssh/id_rsa
|
||||||
|
ls -la /home/runner/.ssh/
|
||||||
ssh-keyscan -t rsa,dsa,ecdsa,ed25519 ${{secrets.SSH_HOST}} >> /home/runner/.ssh/known_hosts
|
ssh-keyscan -t rsa,dsa,ecdsa,ed25519 ${{secrets.SSH_HOST}} >> /home/runner/.ssh/known_hosts
|
||||||
|
|
||||||
- name: SSH to the Prod env
|
- name: SSH to the Prod env
|
||||||
|
Reference in New Issue
Block a user