-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created new Github Action to deploy the new artifact on a dedicated hetzner machine.
- Loading branch information
1 parent
5123a7e
commit e7643e9
Showing
5 changed files
with
74 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Deploy on Hetzner WIAB setup | ||
on: | ||
workflow_run: | ||
workflows: ["Prepare custom offline package"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: autodeploy-script | ||
cancel-in-progress: false | ||
|
||
steps: | ||
# Step 1: Checkout the repository code | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
# Step 2: Set up SSH key for remote access | ||
- name: Set up SSH key | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.WIAB_PRIVATE_SSH_KEY }} | ||
|
||
# Step 3: Get the latest commit SHA, for the artifact | ||
- name: Get latest commit SHA | ||
id: get_commit_sha | ||
run: | | ||
COMMIT_SHA=$(git rev-parse HEAD) | ||
echo "commit_sha=$COMMIT_SHA" >> $GITHUB_ENV | ||
# Step 4: Run the autodeploy script | ||
- name: Run Auto Deploy Script | ||
run: | | ||
cd bin | ||
./autodeploy.sh --artifact-hash ${{ env.COMMIT_SHA }} --target-domain wiab-test-box.wire.link --force-redeploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
become: true | ||
vars: | ||
artifact_hash: d8fe36747614968ea73ebd43d47b99364c52f9c1 | ||
ubuntu_version: 22.04.4 | ||
ubuntu_version: 22.04.5 | ||
ssh_pubkey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDPTGTo1lTqd3Ym/75MRyQvj8xZINO/GI6FzfIadSe5c [email protected]" | ||
tasks: | ||
- name: set ipv4 forward | ||
|
@@ -171,7 +171,6 @@ | |
stat: | ||
path: /home/demo/wire-server-deploy-static-{{ artifact_hash }}.tgz | ||
get_checksum: False | ||
get_md5: False | ||
register: artifact_archive_file_check | ||
- name: download wire-server-deploy archive | ||
shell: | ||
|
@@ -182,7 +181,6 @@ | |
stat: | ||
path: /home/demo/wire-server-deploy/containers-helm.tar | ||
get_checksum: False | ||
get_md5: False | ||
register: artifact_folder_content_check | ||
- name: unpack wire-server-deploy archive | ||
unarchive: | ||
|
@@ -194,7 +192,6 @@ | |
stat: | ||
path: /home/demo/wire-server-deploy/ubuntu.iso | ||
get_checksum: False | ||
get_md5: False | ||
register: iso_file_check | ||
- name: download ubuntu {{ ubuntu_version }} iso | ||
shell: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters