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
207e4f3b
Unverified
Commit
207e4f3b
authored
1 year ago
by
Srgr0
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
dev: Update misskey-tga deploy-test-environment.yml (#13221)
parent
7a8cf274
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
+51
-8
51 additions, 8 deletions
.github/workflows/deploy-test-environment.yml
with
51 additions
and
8 deletions
.github/workflows/deploy-test-environment.yml
+
51
−
8
View file @
207e4f3b
name
:
deploy-test-environment
on
:
#push:
issue_comment
:
types
:
[
created
]
workflow_dispatch
:
inputs
:
repository
:
description
:
'
Repository
to
deploy
(optional)'
type
:
string
description
:
'
Repository
to
deploy
(optional,
use
the
repository
where
this
workflow
is
stored
by
default)'
required
:
false
default
:
'
'
branch_or_hash
:
description
:
'
Branch
or
Commit
hash
to
deploy
(optional)'
type
:
string
description
:
'
Branch
or
Commit
hash
to
deploy
(optional,
use
the
branch
where
this
workflow
is
stored
by
default)'
required
:
false
default
:
'
'
wait_time
:
description
:
'
Time
to
wait
in
seconds
(optional,
1800
seconds
by
default)'
required
:
false
default
:
'
'
jobs
:
deploy-test-environment
:
get-pr-ref
:
runs-on
:
ubuntu-latest
if
:
github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/preview')
outputs
:
pr-ref
:
${{ steps.get-ref.outputs.pr-ref }}
wait_time
:
${{ steps.get-wait-time.outputs.wait_time }}
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v4
-
name
:
Get PR ref
id
:
get-ref
env
:
GH_TOKEN
:
${{ github.token }}
run
:
|
PR_NUMBER=$(jq --raw-output .issue.number $GITHUB_EVENT_PATH)
PR_REF=$(gh pr view $PR_NUMBER --json headRefName -q '.headRefName')
echo "pr-ref=$PR_REF" > $GITHUB_OUTPUT
-
name
:
Extract wait time
id
:
get-wait-time
run
:
|
COMMENT_BODY="${{ github.event.comment.body }}"
WAIT_TIME=$(echo "$COMMENT_BODY" | grep -oP '(?<=/preview\s)\d+' || echo "1800")
echo "wait_time=$WAIT_TIME" > $GITHUB_OUTPUT
deploy-test-environment-pr-comment
:
needs
:
get-pr-ref
uses
:
joinmisskey/misskey-tga/.github/workflows/deploy-test-environment.yml@main
with
:
repository
:
${{ github.repository }}
branch_or_hash
:
${{ needs.get-pr-ref.outputs.pr-ref }}
wait_time
:
${{ needs.get-pr-ref.outputs.wait_time }}
secrets
:
DISCORD_WEBHOOK_URL
:
${{ secrets.DISCORD_WEBHOOK_URL }}
deploy-test-environment-wd
:
if
:
github.event_name == 'workflow_dispatch'
uses
:
joinmisskey/misskey-tga/.github/workflows/deploy-test-environment.yml@main
with
:
repository
:
${{ github.event.inputs.repository }}
branch_or_hash
:
${{ github.event.inputs.branch_or_hash }}
repository
:
${{ inputs.repository || github.repository }}
branch_or_hash
:
${{ inputs.branch_or_hash || github.ref_name }}
wait_time
:
${{ inputs.wait_time || '1800' }}
secrets
:
DISCORD_WEBHOOK_URL
:
${{ secrets.DISCORD_WEBHOOK_URL }}
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