Skip to content

Commit

Permalink
test: github actions OVH
Browse files Browse the repository at this point in the history
  • Loading branch information
FlawaCLV committed Nov 24, 2023
1 parent 6beb291 commit 974106f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions .github/actions/docker-ovh-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ inputs:
ssh_host:
description: "OVH Container SSH host"
required: true
ssh_private_key:
description: "OVH Container SSH private key"
ssh_public_key:
description: "OVH Container SSH public key"
required: true
ssh_private_key_name:
description: "OVH Container SSH private key name"
ssh_public_key_name:
description: "OVH Container SSH public key name"
required: false
default: "id_rsa_ovh_container"
default: "id_rsa_ovh_container.pub"
registry:
description: "OVH Container Registry"
required: true
Expand All @@ -38,9 +38,9 @@ runs:
- name: Deploy Container
shell: bash
run: |
echo "${{ inputs.ssh_private_key }}" > ~/.ssh/${{ inputs.ssh_private_key_name }}
sudo chmod 600 ~/.ssh/${{ inputs.ssh_private_key_name }}
ssh -t -t ${{ inputs.ssh_username }}@${{ inputs.ssh_host }} -i ~/.ssh/${{ inputs.ssh_private_key_name }} << EOF
echo "${{ inputs.ssh_public_key }}" > ~/.ssh/${{ inputs.ssh_public_key_name }}
sudo chmod 600 ~/.ssh/${{ inputs.ssh_public_key_name }}
ssh -t -t ${{ inputs.ssh_username }}@${{ inputs.ssh_host }} -i ~/.ssh/${{ inputs.ssh_public_key_name }} << EOF
docker login ${{ inputs.registry }} -u ${{ inputs.username }} -p ${{ inputs.password }}
docker pull ${{ inputs.registry }}/${{ inputs.image_name }}:${{ inputs.image_tag }}
docker stop $(docker ps -aq)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/api-ovh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
with:
ssh_username: ${{ secrets.OVH_SSH_USERNAME }}
ssh_host: ${{ secrets.OVH_SSH_HOST }}
ssh_private_key: ${{ secrets.OVH_SSH_PRIVATE_KEY }}
ssh_private_key: ${{ secrets.OVH_SSH_PUBLIC_KEY }}
registry: ${{ secrets.OVH_REGISTRY_ENDPOINT }}
username: ${{ secrets.OVH_USERNAME }}
password: ${{ secrets.OVH_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion api/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const validateCustomHeader = require("./middlewares/validateCustomHeader");

app.get("/", async (req, res) => {
const d = new Date();
res.status(200).send("SNU OVH Deploy v3" + d.toLocaleString());
res.status(200).send("SNU OVH Deploy v4" + d.toLocaleString());
});

app.get("/testsentry", async (req, res) => {
Expand Down

0 comments on commit 974106f

Please sign in to comment.