mirror of
https://github.com/bitwarden/self-host.git
synced 2026-06-28 06:15:46 +00:00
Update 'update-rebrandly-link' action (#12)
This commit is contained in:
16
.github/workflows/update-links.yml
vendored
16
.github/workflows/update-links.yml
vendored
@@ -37,33 +37,33 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Update Bitwarden Script PowerShell Link
|
||||
uses: bitwarden/gh-actions/update-rebrandly-link@664c8899c95490c65dac0df11519d24ed8419c85
|
||||
uses: bitwarden/gh-actions/update-rebrandly-link@340a677ffb0c53e50ca67cd2c12044cd7f7fc725
|
||||
with:
|
||||
apikey: ${{ steps.retrieve-secrets.outputs.rebrandly-apikey }}
|
||||
domain: "go.btwrdn.co"
|
||||
slashtag: "bw-ps"
|
||||
destination: "https://github.org/bitwarden/self-host/releases/download/${{ steps.tag-name.outputs.value }}/bitwarden.ps1"
|
||||
destination: "https://github.com/bitwarden/self-host/releases/download/${{ steps.tag-name.outputs.value }}/bitwarden.ps1"
|
||||
|
||||
- name: Update Run Script PowerShell Link
|
||||
uses: bitwarden/gh-actions/update-rebrandly-link@664c8899c95490c65dac0df11519d24ed8419c85
|
||||
uses: bitwarden/gh-actions/update-rebrandly-link@340a677ffb0c53e50ca67cd2c12044cd7f7fc725
|
||||
with:
|
||||
apikey: ${{ steps.retrieve-secrets.outputs.rebrandly-apikey }}
|
||||
domain: "go.btwrdn.co"
|
||||
slashtag: "bw-ps-run"
|
||||
destination: "https://github.org/bitwarden/self-host/releases/download/${{ steps.tag-name.outputs.value }}/run.ps1"
|
||||
destination: "https://github.com/bitwarden/self-host/releases/download/${{ steps.tag-name.outputs.value }}/run.ps1"
|
||||
|
||||
- name: Update Bitwarden Script Shell Link
|
||||
uses: bitwarden/gh-actions/update-rebrandly-link@664c8899c95490c65dac0df11519d24ed8419c85
|
||||
uses: bitwarden/gh-actions/update-rebrandly-link@340a677ffb0c53e50ca67cd2c12044cd7f7fc725
|
||||
with:
|
||||
apikey: ${{ steps.retrieve-secrets.outputs.rebrandly-apikey }}
|
||||
domain: "go.btwrdn.co"
|
||||
slashtag: "bw-sh"
|
||||
destination: "https://github.org/bitwarden/self-host/releases/download/${{ steps.tag-name.outputs.value }}/bitwarden.sh"
|
||||
destination: "https://github.com/bitwarden/self-host/releases/download/${{ steps.tag-name.outputs.value }}/bitwarden.sh"
|
||||
|
||||
- name: Update Run Script Shell Link
|
||||
uses: bitwarden/gh-actions/update-rebrandly-link@664c8899c95490c65dac0df11519d24ed8419c85
|
||||
uses: bitwarden/gh-actions/update-rebrandly-link@340a677ffb0c53e50ca67cd2c12044cd7f7fc725
|
||||
with:
|
||||
apikey: ${{ steps.retrieve-secrets.outputs.rebrandly-apikey }}
|
||||
domain: "go.btwrdn.co"
|
||||
slashtag: "bw-sh-run"
|
||||
destination: "https://github.org/bitwarden/self-host/releases/download/${{ steps.tag-name.outputs.value }}/run.sh"
|
||||
destination: "https://github.com/bitwarden/self-host/releases/download/${{ steps.tag-name.outputs.value }}/run.sh"
|
||||
|
||||
@@ -24,7 +24,8 @@ if ($output -eq "") {
|
||||
}
|
||||
|
||||
$scriptsDir = "${output}\scripts"
|
||||
$githubBaseUrl = "https://raw.githubusercontent.com/bitwarden/server/master"
|
||||
$bitwardenScriptUrl = "https://go.btwrdn.co/bw-ps"
|
||||
$runScriptUrl = "https://go.btwrdn.co/bw-ps-run"
|
||||
|
||||
# Please do not create pull requests modifying the version numbers.
|
||||
$coreVersion = "1.46.2"
|
||||
@@ -34,14 +35,14 @@ $keyConnectorVersion = "1.0.1"
|
||||
# Functions
|
||||
|
||||
function Get-Self {
|
||||
Invoke-RestMethod -OutFile $scriptPath -Uri "${githubBaseUrl}/scripts/bitwarden.ps1"
|
||||
Invoke-RestMethod -OutFile $scriptPath -Uri $bitwardenScriptUrl
|
||||
}
|
||||
|
||||
function Get-Run-File {
|
||||
if (!(Test-Path -Path $scriptsDir)) {
|
||||
New-Item -ItemType directory -Path $scriptsDir | Out-Null
|
||||
}
|
||||
Invoke-RestMethod -OutFile $scriptsDir\run.ps1 -Uri "${githubBaseUrl}/scripts/run.ps1"
|
||||
Invoke-RestMethod -OutFile $scriptsDir\run.ps1 -Uri $runScriptUrl
|
||||
}
|
||||
|
||||
function Test-Output-Dir-Exists {
|
||||
@@ -79,7 +80,7 @@ See more at https://bitwarden.com/help/article/install-on-premise/#script-comman
|
||||
}
|
||||
|
||||
function Write-Line($str) {
|
||||
if($env:BITWARDEN_QUIET -ne "true") {
|
||||
if ($env:BITWARDEN_QUIET -ne "true") {
|
||||
Write-Host $str
|
||||
}
|
||||
}
|
||||
@@ -104,7 +105,7 @@ https://bitwarden.com, https://github.com/bitwarden
|
||||
===================================================
|
||||
"
|
||||
|
||||
if($env:BITWARDEN_QUIET -ne "true") {
|
||||
if ($env:BITWARDEN_QUIET -ne "true") {
|
||||
Write-Line "bitwarden.ps1 version ${coreVersion}"
|
||||
docker --version
|
||||
docker-compose --version
|
||||
|
||||
@@ -37,7 +37,8 @@ else
|
||||
fi
|
||||
|
||||
SCRIPTS_DIR="$OUTPUT/scripts"
|
||||
GITHUB_BASE_URL="https://raw.githubusercontent.com/bitwarden/server/master"
|
||||
BITWARDEN_SCRIPT_URL="https://go.btwrdn.co/bw-sh"
|
||||
RUN_SCRIPT_URL="https://go.btwrdn.co/bw-sh-run"
|
||||
|
||||
# Please do not create pull requests modifying the version numbers.
|
||||
COREVERSION="1.46.2"
|
||||
@@ -57,7 +58,7 @@ echo ""
|
||||
# Functions
|
||||
|
||||
function downloadSelf() {
|
||||
if curl -s -w "http_code %{http_code}" -o $SCRIPT_PATH.1 $GITHUB_BASE_URL/scripts/bitwarden.sh | grep -q "^http_code 20[0-9]"
|
||||
if curl -L -s -w "http_code %{http_code}" -o $SCRIPT_PATH.1 $BITWARDEN_SCRIPT_URL | grep -q "^http_code 20[0-9]"
|
||||
then
|
||||
mv $SCRIPT_PATH.1 $SCRIPT_PATH
|
||||
chmod u+x $SCRIPT_PATH
|
||||
@@ -71,7 +72,7 @@ function downloadRunFile() {
|
||||
then
|
||||
mkdir $SCRIPTS_DIR
|
||||
fi
|
||||
curl -s -o $SCRIPTS_DIR/run.sh $GITHUB_BASE_URL/scripts/run.sh
|
||||
curl -L -s -o $SCRIPTS_DIR/run.sh $RUN_SCRIPT_URL
|
||||
chmod u+x $SCRIPTS_DIR/run.sh
|
||||
rm -f $SCRIPTS_DIR/install.sh
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user