Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dima Krasner
Sharkey
Commits
4553d642
Commit
4553d642
authored
1 year ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Create deploy-test-environment.yml (#13079)"
This reverts commit
4de14fb5
.
parent
b33cfc28
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/deploy-test-environment.yml
+0
-66
0 additions, 66 deletions
.github/workflows/deploy-test-environment.yml
with
0 additions
and
66 deletions
.github/workflows/deploy-test-environment.yml
deleted
100644 → 0
+
0
−
66
View file @
b33cfc28
name
:
Deploy test environment
on
:
push
:
workflow_dispatch
:
inputs
:
repository
:
description
:
'
Repository
to
deploy
(optional)'
required
:
false
branch
:
description
:
'
Branch
to
deploy
(optional)'
required
:
false
jobs
:
deploy-test-environment
:
runs-on
:
ubuntu-latest
steps
:
-
name
:
Set environment variable (for tput command & pnpm)
run
:
|
echo "TERM=xterm" >> $GITHUB_ENV
REPOSITORY=${{ github.event.inputs.repository || github.repository }}
echo "REPOSITORY=$REPOSITORY" >> $GITHUB_ENV
BRANCH=${{ github.event.inputs.branch || github.ref_name }}
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
-
name
:
Checkout
uses
:
actions/checkout@v4
with
:
repository
:
${{ env.REPOSITORY }}
ref
:
${{ env.BRANCH }}
-
name
:
Get the latest commit SHA
run
:
|
SHA=$(git log -1 --format="%H")
echo "SHA=$SHA" >> $GITHUB_ENV
-
name
:
Start cloudflare tunnel (quick)
run
:
|
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
sudo dpkg -i cloudflared-linux-amd64.deb
sudo cloudflared tunnel --metrics localhost:55555 --url localhost:3000 > /dev/null 2>&1 &
sleep 15
TUNNEL_RESPONSE=$(curl http://localhost:55555/quicktunnel)
TUNNEL_DOMAIN=$(echo $TUNNEL_RESPONSE | grep -o '"hostname":"[^"]*' | grep -o '[^"]*$')
echo "::add-mask::$TUNNEL_DOMAIN"
echo "TUNNEL_DOMAIN=$TUNNEL_DOMAIN" >> $GITHUB_ENV
-
name
:
Install misskey
run
:
|
wget https://raw.githubusercontent.com/joinmisskey/bash-install/v4/misskey-install.sh
wget https://raw.githubusercontent.com/joinmisskey/bash-install/v4/testenv_githubactions.txt
sed -i "s/host=127.0.0.1/host=$TUNNEL_DOMAIN/g" testenv_githubactions.txt
sed -i "s|git_repository=https://github.com/misskey-dev/misskey|git_repository=https://github.com/$REPOSITORY|g" testenv_githubactions.txt
sed -i "s|git_branch=master|git_branch=$BRANCH|g" testenv_githubactions.txt
sudo chmod 555 ./misskey-install.sh
sudo bash -x ./misskey-install.sh -c ./testenv_githubactions.txt
-
name
:
Post tunnel info to Discord
run
:
|
CURRENT_TIME=$(TZ=Asia/Tokyo date +'%Y-%m-%d %H:%M:%S JST')
COMMIT_URL="https://github.com/$REPOSITORY/commit/$SHA"
curl -X POST -H "Content-Type: application/json" -d "{\"content\": \"==============================\nURL: https://$TUNNEL_DOMAIN\nRepository: $REPOSITORY\nBranch: $BRANCH\nCommit: $COMMIT_URL\nTime: $CURRENT_TIME\n==============================\"}" ${{ secrets.DISCORD_WEBHOOK_URL }}
-
name
:
Wait
run
:
|
timeout 3600 tail -f /var/log/syslog || true
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment