Skip to content

Commit

Permalink
Merge branch 'add_test_ci' of github.com:meilisearch/cloud-providers …
Browse files Browse the repository at this point in the history
…into add_test_ci
  • Loading branch information
bidoubiwa committed May 2, 2023
2 parents 7af4160 + 05efef8 commit 3a29ebb
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .github/scripts/check_instance.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#!/bin/bash

PUBLIC_IP=$1
echo "http://$PUBLIC_IP"
echo $PUBLIC_IP
start_time=$(date +%s)

while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' --max-time 5 http://$PUBLIC_IP)" != "200" ]]; do
while [ "$(curl -s -o /dev/null -w ''%{http_code}'' --max-time 5 http://$PUBLIC_IP)" != "200" ]; do
sleep 5

elapsed_time=$(($(date +%s) - $start_time))
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/manual_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish Manually

on:
workflow_dispatch:
inputs:
provider:
type: choice
description: Choose the provider you want to publish
options:
- "amazon-ebs"
- "digitalocean"
- "googlecompute"
required: true

env:
PACKER_VERSION: "latest"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

jobs:
publishing:
name: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup `packer`
uses: hashicorp/setup-packer@main
with:
version: ${{ env.PACKER_VERSION }}

- name: Run `packer init`
run: "packer init ."

- name: Run `packer build`
run: "packer build -only ${{ github.event.inputs.provider }}.debian ."
3 changes: 0 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
tags:
- v*

on:
pull_request:

env:
PACKER_VERSION: "latest"
DIGITALOCEAN_ACCESS_TOKEN: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
Expand Down

0 comments on commit 3a29ebb

Please sign in to comment.