test
This commit is contained in:
parent
dc04e271d7
commit
311a764206
|
|
@ -5,45 +5,42 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- Main
|
- Main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
IMAGESTOR_CI:name: IMAGESTOR CI
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- Main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
IMAGESTOR_CI:
|
IMAGESTOR_CI:
|
||||||
runs-on: [linux]
|
runs-on: [linux]
|
||||||
steps:
|
steps:
|
||||||
# --- STARTUP DISCORD NOTIFICATION ----
|
|
||||||
- name: Send Startup Notification to Discord
|
- name: Send Startup Notification to Discord
|
||||||
|
uses: sarisia/actions-status-discord@v1.16.0
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
with:
|
||||||
curl -H "Content-Type: application/json" \
|
webhook: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
-d "{
|
nodetail: true
|
||||||
\"username\": \"Fred The Builder\",
|
title: "Beginning IMAGESTOR WEB CI"
|
||||||
\"avatar_url\": \"https://i.imgur.com/tgpIa7T.png\",
|
description: "Workflow triggered by commit: https://git.cstmgames.dev/${{ github.repository }}/commit/${{ github.sha }}"
|
||||||
\"embeds\": [
|
username: "Fred The Builder"
|
||||||
{
|
avatar_url: https://i.imgur.com/tgpIa7T.png
|
||||||
\"title\": \"Beginning IMAGESTOR WEB CI\",
|
color: 0xf7c12a #Yellow
|
||||||
\"description\": \"Workflow triggered by commit: https://git.cstmgames.dev/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}\",
|
|
||||||
\"color\": 16217354
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}" \
|
|
||||||
"${{ secrets.DISCORD_WEBHOOK }}"
|
|
||||||
|
|
||||||
# --- CHECKOUT REPO ---
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3.5.3
|
uses: actions/checkout@v3.5.3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# --- RESTORE LAST MODIFICATION TIMESTAMPS ---
|
|
||||||
- name: Restore Last Modificaiton Timestamps
|
- name: Restore Last Modificaiton Timestamps
|
||||||
uses: chetan/git-restore-mtime-action@v2
|
uses: chetan/git-restore-mtime-action@v2
|
||||||
|
|
||||||
# --- MOVE CODE TO WORKING DIRECTORY ---
|
|
||||||
- name: Move code to working directory so upload is easier
|
- name: Move code to working directory so upload is easier
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ./workingdir2
|
mkdir -p ./workingdir2
|
||||||
find ./ -mindepth 1 -maxdepth 1 -type d ! -name '.git' ! -name '.github' ! -name 'workingdir2' ! -name '.vscode' -exec mv -t workingdir2/ {} +
|
find ./ -mindepth 1 -maxdepth 1 -type d ! -name '.git' ! -name '.github' ! -name 'workingdir2' ! -name '.vscode' -exec mv -t workingdir2/ {} +
|
||||||
|
|
||||||
# --- SFTP UPLOAD WEB ---
|
|
||||||
- name: SFTP Upload - Web
|
- name: SFTP Upload - Web
|
||||||
uses: wangyucode/sftp-upload-action@v2.0.2
|
uses: wangyucode/sftp-upload-action@v2.0.2
|
||||||
with:
|
with:
|
||||||
|
|
@ -56,7 +53,6 @@ jobs:
|
||||||
exclude: '*.git/*,*.git/,*.github/*,*.github/,README.md,.gitignore'
|
exclude: '*.git/*,*.git/,*.github/*,*.github/,README.md,.gitignore'
|
||||||
removeExtraFilesOnServer: true
|
removeExtraFilesOnServer: true
|
||||||
|
|
||||||
# --- SFTP UPLOAD FIVEM ---
|
|
||||||
- name: SFTP Upload - Fivem
|
- name: SFTP Upload - Fivem
|
||||||
uses: wangyucode/sftp-upload-action@v2.0.2
|
uses: wangyucode/sftp-upload-action@v2.0.2
|
||||||
with:
|
with:
|
||||||
|
|
@ -69,25 +65,16 @@ jobs:
|
||||||
exclude: '*.git/*,*.git/,*.github/*,*.github/,README.md,.gitignore'
|
exclude: '*.git/*,*.git/,*.github/*,*.github/,README.md,.gitignore'
|
||||||
removeExtraFilesOnServer: true
|
removeExtraFilesOnServer: true
|
||||||
|
|
||||||
# --- MOVE CODE BACK ---
|
|
||||||
- name: Put It All Back
|
- name: Put It All Back
|
||||||
run: |
|
run: |
|
||||||
mv ./workingdir2/* ./
|
mv ./workingdir2/* ./
|
||||||
|
|
||||||
# --- ENDING DISCORD NOTIFICATION ---
|
|
||||||
- name: Send Ending Notification to Discord
|
- name: Send Ending Notification to Discord
|
||||||
|
uses: sarisia/actions-status-discord@v1.16.0
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
with:
|
||||||
curl -H "Content-Type: application/json" \
|
webhook: ${{ secrets.DISCORD_WEBHOOK}}
|
||||||
-d "{
|
title: "Completed IMAGESTOR WEB CI"
|
||||||
\"username\": \"Fred The Builder\",
|
description: "Commit: https://git.cstmgames.dev/${{ github.repository }}/commit/${{ github.sha }} is now live on the Dev server."
|
||||||
\"avatar_url\": \"https://i.imgur.com/tgpIa7T.png\",
|
username: "Fred The Builder"
|
||||||
\"embeds\": [
|
avatar_url: https://i.imgur.com/tgpIa7T.png
|
||||||
{
|
color: 0x2af753 #Green
|
||||||
\"title\": \"Completed IMAGESTOR WEB CI\",
|
|
||||||
\"description\": \"Commit: https://git.cstmgames.dev/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA} is now live on the Dev server.\",
|
|
||||||
\"color\": 2852499
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}" \
|
|
||||||
"${{ secrets.DISCORD_WEBHOOK }}"
|
|
||||||
Loading…
Reference in New Issue