Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: enhance GitHub Actions for IPv6 and flexibility #303

Merged
merged 2 commits into from
Mar 16, 2024
Merged

ci: enhance GitHub Actions for IPv6 and flexibility #303

merged 2 commits into from
Mar 16, 2024

Conversation

appleboy
Copy link
Owner

@appleboy appleboy commented Mar 16, 2024

  • Add a new CI job for testing IPv6 in GitHub Actions workflow
  • Update the Docker image version from 1.7.3 to 1.7.4
  • Add a new protocol input parameter to the GitHub action with a default value of tcp
  • Change the GitHub action to use a composite run steps action instead of a Docker container
  • Update the entrypoint.sh script to use bash instead of sh, set stricter error handling, and add a function to detect client platform and architecture
  • Modify the entrypoint.sh script to download a specific version of drone-ssh based on the detected client info and execute it

fixed #146
reference: actions/runner-images#668

- Add a new CI job for testing IPv6 in GitHub Actions workflow
- Update the Docker image version from `1.7.3` to `1.7.4`
- Add a new `protocol` input parameter to the GitHub action with a default value of `tcp`
- Change the GitHub action to use a composite run steps action instead of a Docker container
- Update the `entrypoint.sh` script to use `bash` instead of `sh`, set stricter error handling, and add a function to detect client platform and architecture
- Modify the `entrypoint.sh` script to download a specific version of `drone-ssh` based on the detected client info and execute it

Signed-off-by: Bo-Yi Wu <[email protected]>
- Remove IPv6 ping command from CI workflow
- Uncomment Docker run configuration in action.yml

Signed-off-by: Bo-Yi Wu <[email protected]>
@appleboy appleboy merged commit c781418 into master Mar 16, 2024
6 checks passed
@appleboy appleboy deleted the ipv6 branch March 16, 2024 07:45
@muckelba
Copy link

Hey, this PR broke my pipeline:
image

I have zero clue why changing the shebang from #!/bin/sh to #!/usr/bin/env bash should cause this error.
I'm using ubuntu-latest for that job.

@appleboy
Copy link
Owner Author

@muckelba I will take it. Thanks for your report.

@appleboy
Copy link
Owner Author

@muckelba I try the ubuntu-latest os. It is working. Can you show all the configs?

@muckelba
Copy link

name: Create, publish and deploy a Docker image

on:
  push:
    branches:
      - main
      - develop

env:
  REGISTRY: ghcr.io
  IMAGE_NAME: ${{ github.repository }}

jobs:
  build-and-push-image:
    runs-on: ubuntu-latest

    steps:
      - name: Check out code
        uses: actions/checkout@v3

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Login to GHCR
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Build Docker image
        uses: docker/build-push-action@v3
        with:
          context: .
          push: true
          tags: ghcr.io/${{ env.IMAGE_NAME }}:${{ github.ref_name }}

  deploy:
    runs-on: ubuntu-latest
    needs: build-and-push-image

    steps:
      - name: SSH Deploy
        uses: appleboy/ssh-action@master
        with:
          host: ${{ secrets.HOST }}
          username: ${{ secrets.USERNAME }}
          key: ${{ secrets.SSHKEY }}
          script: |
            cd ${{ secrets.PATH }}_${{ github.ref_name }}
            echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin
            docker compose pull && docker compose up -d

this is my whole config

@appleboy
Copy link
Owner Author

@muckelba move to #306 for further discussion.

Vylpes pushed a commit to Vylpes/card-drop that referenced this pull request Oct 8, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [appleboy/ssh-action](https://github.com/appleboy/ssh-action) | action | minor | `v1.0.3` -> `v1.1.0` |

---

### Release Notes

<details>
<summary>appleboy/ssh-action (appleboy/ssh-action)</summary>

### [`v1.1.0`](https://github.com/appleboy/ssh-action/releases/tag/v1.1.0)

[Compare Source](appleboy/ssh-action@v1.0.3...v1.1.0)

##### Changelog

##### Bug fixes

-   [`0c7561b`](appleboy/ssh-action@0c7561b): fix: switch to SSH key authentication for security ([@&#8203;appleboy](https://github.com/appleboy))

##### Enhancements

-   [`9b978f0`](appleboy/ssh-action@9b978f0): chore: update SSH action version in README files ([@&#8203;appleboy](https://github.com/appleboy))
-   [`1991c55`](appleboy/ssh-action@1991c55): chore(file): update target file ([@&#8203;appleboy](https://github.com/appleboy))
-   [`aa293c2`](appleboy/ssh-action@aa293c2): chore: optimize system configuration and API integration ([@&#8203;appleboy](https://github.com/appleboy))
-   [`036cad7`](appleboy/ssh-action@036cad7): chore: update drone-ssh to version 1.7.7 ([@&#8203;appleboy](https://github.com/appleboy))
-   [`8b60782`](appleboy/ssh-action@8b60782): chore(cli): enhance version handling and testing mechanisms ([@&#8203;appleboy](https://github.com/appleboy))
-   [`5ade826`](appleboy/ssh-action@5ade826): chore: improve CLI reliability and version visibility ([@&#8203;appleboy](https://github.com/appleboy))
-   [`eaeb069`](appleboy/ssh-action@eaeb069): chore(cli): enhance curl command with silent mode and redirects ([@&#8203;appleboy](https://github.com/appleboy))
-   [`58164d0`](appleboy/ssh-action@58164d0): chore: remove Dockerfile and related configurations ([@&#8203;appleboy](https://github.com/appleboy))

##### Refactor

-   [`da612c8`](appleboy/ssh-action@da612c8): refactor: optimize CI pipeline for faster execution ([@&#8203;appleboy](https://github.com/appleboy))

##### Build process updates

-   [`c781418`](appleboy/ssh-action@c781418): ci: enhance GitHub Actions for IPv6 and flexibility ([#&#8203;303](appleboy/ssh-action#303)) ([@&#8203;appleboy](https://github.com/appleboy))
-   [`d2d6858`](appleboy/ssh-action@d2d6858): ci: enhance GitHub workflow for SSH actions and deployments ([@&#8203;appleboy](https://github.com/appleboy))
-   [`551964e`](appleboy/ssh-action@551964e): ci: optimize GitHub Actions workflow configuration ([@&#8203;appleboy](https://github.com/appleboy))
-   [`f916346`](appleboy/ssh-action@f916346): ci: refactor CI workflow and improve robustness ([#&#8203;320](appleboy/ssh-action#320)) ([@&#8203;appleboy](https://github.com/appleboy))
-   [`aabaf12`](appleboy/ssh-action@aabaf12): ci: add bug report template ([@&#8203;appleboy](https://github.com/appleboy))
-   [`c8594ae`](appleboy/ssh-action@c8594ae): ci: implement GitHub Actions for remote SSH execution ([@&#8203;appleboy](https://github.com/appleboy))
-   [`40aad53`](appleboy/ssh-action@40aad53): ci: add SSH authentication setup for GitHub Actions ([@&#8203;appleboy](https://github.com/appleboy))
-   [`0b0e770`](appleboy/ssh-action@0b0e770): ci: optimize and enhance SSH server workflow ([@&#8203;appleboy](https://github.com/appleboy))
-   [`977b74a`](appleboy/ssh-action@977b74a): ci: enhance CI workflow with SSH job and optimizations ([@&#8203;appleboy](https://github.com/appleboy))
-   [`2eeab5b`](appleboy/ssh-action@2eeab5b): ci: refactor GitHub Actions key management ([@&#8203;appleboy](https://github.com/appleboy))
-   [`acd41e5`](appleboy/ssh-action@acd41e5): ci: enhance SSH job testing with varied key/password scenarios ([@&#8203;appleboy](https://github.com/appleboy))
-   [`f05aefe`](appleboy/ssh-action@f05aefe): ci: enhance SSH action configuration and error handling ([@&#8203;appleboy](https://github.com/appleboy))
-   [`e40b597`](appleboy/ssh-action@e40b597): ci: add GitHub Actions job for SSH key passphrase support ([@&#8203;appleboy](https://github.com/appleboy))
-   [`15b64dc`](appleboy/ssh-action@15b64dc): ci: enhance CI pipeline with SSH key handling improvements ([@&#8203;appleboy](https://github.com/appleboy))
-   [`a39b3cc`](appleboy/ssh-action@a39b3cc): ci: enhance CI/CD pipeline with SSH command execution ([@&#8203;appleboy](https://github.com/appleboy))
-   [`815c574`](appleboy/ssh-action@815c574): ci: enhance deployment with multi-host SSH action ([@&#8203;appleboy](https://github.com/appleboy))
-   [`378323e`](appleboy/ssh-action@378323e): ci: add multi-server support to CI workflow ([@&#8203;appleboy](https://github.com/appleboy))
-   [`fc1c1fc`](appleboy/ssh-action@fc1c1fc): ci: add GitHub Actions job for [`ed25519`](appleboy/ssh-action@ed25519) key support ([@&#8203;appleboy](https://github.com/appleboy))
-   [`f0e5a23`](appleboy/ssh-action@f0e5a23): ci: add environment variable handling in GitHub Actions ([@&#8203;appleboy](https://github.com/appleboy))
-   [`9c32aa6`](appleboy/ssh-action@9c32aa6): ci: refactor workflows and API integrations ([@&#8203;appleboy](https://github.com/appleboy))
-   [`97f8d75`](appleboy/ssh-action@97f8d75): ci: enable root access in CI pipeline ([@&#8203;appleboy](https://github.com/appleboy))
-   [`5a8776f`](appleboy/ssh-action@5a8776f): ci: switch to password authentication in GitHub workflow ([@&#8203;appleboy](https://github.com/appleboy))
-   [`b6941ae`](appleboy/ssh-action@b6941ae): ci: refactor codebase and optimize performance ([@&#8203;appleboy](https://github.com/appleboy))
-   [`43895f2`](appleboy/ssh-action@43895f2): ci: refactor SSH testing workflows and job configurations ([@&#8203;appleboy](https://github.com/appleboy))
-   [`06fa62e`](appleboy/ssh-action@06fa62e): ci: rename the workflow files. ([@&#8203;appleboy](https://github.com/appleboy))
-   [`b4a07ca`](appleboy/ssh-action@b4a07ca): ci: enhance GitHub Actions with secret variable support ([#&#8203;330](appleboy/ssh-action#330)) ([@&#8203;appleboy](https://github.com/appleboy))
-   [`25ce8cb`](appleboy/ssh-action@25ce8cb): ci: implement automated release workflow with GoReleaser ([@&#8203;appleboy](https://github.com/appleboy))

##### Documentation updates

-   [`8a779a5`](appleboy/ssh-action@8a779a5): docs: describe true usage of allenvs parameter ([#&#8203;301](appleboy/ssh-action#301)) ([@&#8203;hussu010](https://github.com/hussu010))
-   [`fe44be0`](appleboy/ssh-action@fe44be0): docs: improve documentation and CI robustness ([@&#8203;appleboy](https://github.com/appleboy))
-   [`dd0f09c`](appleboy/ssh-action@dd0f09c): docs: improve README clarity and completeness ([@&#8203;appleboy](https://github.com/appleboy))
-   [`71d43ea`](appleboy/ssh-action@71d43ea): docs: improve documentation and testing configurations ([@&#8203;appleboy](https://github.com/appleboy))
-   [`28428a1`](appleboy/ssh-action@28428a1): docs: improve cross-platform clipboard support for key copying ([@&#8203;appleboy](https://github.com/appleboy))
-   [`d732991`](appleboy/ssh-action@d732991): docs(lang): README.zh-cn Document ([#&#8203;332](appleboy/ssh-action#332)) ([@&#8203;astralwaveio](https://github.com/astralwaveio))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AiLCJsYWJlbHMiOlsidHlwZS9kZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/374
Reviewed-by: Vylpes <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
Vylpes pushed a commit to Vylpes/vylbot-app that referenced this pull request Oct 28, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [appleboy/ssh-action](https://github.com/appleboy/ssh-action) | action | minor | `v1.0.3` -> `v1.1.0` |

---

### Release Notes

<details>
<summary>appleboy/ssh-action (appleboy/ssh-action)</summary>

### [`v1.1.0`](https://github.com/appleboy/ssh-action/releases/tag/v1.1.0)

[Compare Source](appleboy/ssh-action@v1.0.3...v1.1.0)

##### Changelog

##### Bug fixes

-   [`0c7561b`](appleboy/ssh-action@0c7561b): fix: switch to SSH key authentication for security ([@&#8203;appleboy](https://github.com/appleboy))

##### Enhancements

-   [`9b978f0`](appleboy/ssh-action@9b978f0): chore: update SSH action version in README files ([@&#8203;appleboy](https://github.com/appleboy))
-   [`1991c55`](appleboy/ssh-action@1991c55): chore(file): update target file ([@&#8203;appleboy](https://github.com/appleboy))
-   [`aa293c2`](appleboy/ssh-action@aa293c2): chore: optimize system configuration and API integration ([@&#8203;appleboy](https://github.com/appleboy))
-   [`036cad7`](appleboy/ssh-action@036cad7): chore: update drone-ssh to version 1.7.7 ([@&#8203;appleboy](https://github.com/appleboy))
-   [`8b60782`](appleboy/ssh-action@8b60782): chore(cli): enhance version handling and testing mechanisms ([@&#8203;appleboy](https://github.com/appleboy))
-   [`5ade826`](appleboy/ssh-action@5ade826): chore: improve CLI reliability and version visibility ([@&#8203;appleboy](https://github.com/appleboy))
-   [`eaeb069`](appleboy/ssh-action@eaeb069): chore(cli): enhance curl command with silent mode and redirects ([@&#8203;appleboy](https://github.com/appleboy))
-   [`58164d0`](appleboy/ssh-action@58164d0): chore: remove Dockerfile and related configurations ([@&#8203;appleboy](https://github.com/appleboy))

##### Refactor

-   [`da612c8`](appleboy/ssh-action@da612c8): refactor: optimize CI pipeline for faster execution ([@&#8203;appleboy](https://github.com/appleboy))

##### Build process updates

-   [`c781418`](appleboy/ssh-action@c781418): ci: enhance GitHub Actions for IPv6 and flexibility ([#&#8203;303](appleboy/ssh-action#303)) ([@&#8203;appleboy](https://github.com/appleboy))
-   [`d2d6858`](appleboy/ssh-action@d2d6858): ci: enhance GitHub workflow for SSH actions and deployments ([@&#8203;appleboy](https://github.com/appleboy))
-   [`551964e`](appleboy/ssh-action@551964e): ci: optimize GitHub Actions workflow configuration ([@&#8203;appleboy](https://github.com/appleboy))
-   [`f916346`](appleboy/ssh-action@f916346): ci: refactor CI workflow and improve robustness ([#&#8203;320](appleboy/ssh-action#320)) ([@&#8203;appleboy](https://github.com/appleboy))
-   [`aabaf12`](appleboy/ssh-action@aabaf12): ci: add bug report template ([@&#8203;appleboy](https://github.com/appleboy))
-   [`c8594ae`](appleboy/ssh-action@c8594ae): ci: implement GitHub Actions for remote SSH execution ([@&#8203;appleboy](https://github.com/appleboy))
-   [`40aad53`](appleboy/ssh-action@40aad53): ci: add SSH authentication setup for GitHub Actions ([@&#8203;appleboy](https://github.com/appleboy))
-   [`0b0e770`](appleboy/ssh-action@0b0e770): ci: optimize and enhance SSH server workflow ([@&#8203;appleboy](https://github.com/appleboy))
-   [`977b74a`](appleboy/ssh-action@977b74a): ci: enhance CI workflow with SSH job and optimizations ([@&#8203;appleboy](https://github.com/appleboy))
-   [`2eeab5b`](appleboy/ssh-action@2eeab5b): ci: refactor GitHub Actions key management ([@&#8203;appleboy](https://github.com/appleboy))
-   [`acd41e5`](appleboy/ssh-action@acd41e5): ci: enhance SSH job testing with varied key/password scenarios ([@&#8203;appleboy](https://github.com/appleboy))
-   [`f05aefe`](appleboy/ssh-action@f05aefe): ci: enhance SSH action configuration and error handling ([@&#8203;appleboy](https://github.com/appleboy))
-   [`e40b597`](appleboy/ssh-action@e40b597): ci: add GitHub Actions job for SSH key passphrase support ([@&#8203;appleboy](https://github.com/appleboy))
-   [`15b64dc`](appleboy/ssh-action@15b64dc): ci: enhance CI pipeline with SSH key handling improvements ([@&#8203;appleboy](https://github.com/appleboy))
-   [`a39b3cc`](appleboy/ssh-action@a39b3cc): ci: enhance CI/CD pipeline with SSH command execution ([@&#8203;appleboy](https://github.com/appleboy))
-   [`815c574`](appleboy/ssh-action@815c574): ci: enhance deployment with multi-host SSH action ([@&#8203;appleboy](https://github.com/appleboy))
-   [`378323e`](appleboy/ssh-action@378323e): ci: add multi-server support to CI workflow ([@&#8203;appleboy](https://github.com/appleboy))
-   [`fc1c1fc`](appleboy/ssh-action@fc1c1fc): ci: add GitHub Actions job for [`ed25519`](appleboy/ssh-action@ed25519) key support ([@&#8203;appleboy](https://github.com/appleboy))
-   [`f0e5a23`](appleboy/ssh-action@f0e5a23): ci: add environment variable handling in GitHub Actions ([@&#8203;appleboy](https://github.com/appleboy))
-   [`9c32aa6`](appleboy/ssh-action@9c32aa6): ci: refactor workflows and API integrations ([@&#8203;appleboy](https://github.com/appleboy))
-   [`97f8d75`](appleboy/ssh-action@97f8d75): ci: enable root access in CI pipeline ([@&#8203;appleboy](https://github.com/appleboy))
-   [`5a8776f`](appleboy/ssh-action@5a8776f): ci: switch to password authentication in GitHub workflow ([@&#8203;appleboy](https://github.com/appleboy))
-   [`b6941ae`](appleboy/ssh-action@b6941ae): ci: refactor codebase and optimize performance ([@&#8203;appleboy](https://github.com/appleboy))
-   [`43895f2`](appleboy/ssh-action@43895f2): ci: refactor SSH testing workflows and job configurations ([@&#8203;appleboy](https://github.com/appleboy))
-   [`06fa62e`](appleboy/ssh-action@06fa62e): ci: rename the workflow files. ([@&#8203;appleboy](https://github.com/appleboy))
-   [`b4a07ca`](appleboy/ssh-action@b4a07ca): ci: enhance GitHub Actions with secret variable support ([#&#8203;330](appleboy/ssh-action#330)) ([@&#8203;appleboy](https://github.com/appleboy))
-   [`25ce8cb`](appleboy/ssh-action@25ce8cb): ci: implement automated release workflow with GoReleaser ([@&#8203;appleboy](https://github.com/appleboy))

##### Documentation updates

-   [`8a779a5`](appleboy/ssh-action@8a779a5): docs: describe true usage of allenvs parameter ([#&#8203;301](appleboy/ssh-action#301)) ([@&#8203;hussu010](https://github.com/hussu010))
-   [`fe44be0`](appleboy/ssh-action@fe44be0): docs: improve documentation and CI robustness ([@&#8203;appleboy](https://github.com/appleboy))
-   [`dd0f09c`](appleboy/ssh-action@dd0f09c): docs: improve README clarity and completeness ([@&#8203;appleboy](https://github.com/appleboy))
-   [`71d43ea`](appleboy/ssh-action@71d43ea): docs: improve documentation and testing configurations ([@&#8203;appleboy](https://github.com/appleboy))
-   [`28428a1`](appleboy/ssh-action@28428a1): docs: improve cross-platform clipboard support for key copying ([@&#8203;appleboy](https://github.com/appleboy))
-   [`d732991`](appleboy/ssh-action@d732991): docs(lang): README.zh-cn Document ([#&#8203;332](appleboy/ssh-action#332)) ([@&#8203;astralwaveio](https://github.com/astralwaveio))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AiLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://git.vylpes.xyz/RabbitLabs/vylbot-app/pulls/482
Reviewed-by: Vylpes <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error while ssh into ipv6 server.
2 participants