Closed appleboy closed 8 months ago
Hey, this PR broke my pipeline:
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.
@muckelba I will take it. Thanks for your report.
@muckelba I try the ubuntu-latest
os. It is working. Can you show all the configs?
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
@muckelba move to https://github.com/appleboy/ssh-action/issues/306 for further discussion.
1.7.3
to1.7.4
protocol
input parameter to the GitHub action with a default value oftcp
entrypoint.sh
script to usebash
instead ofsh
, set stricter error handling, and add a function to detect client platform and architectureentrypoint.sh
script to download a specific version ofdrone-ssh
based on the detected client info and execute itfixed https://github.com/appleboy/ssh-action/issues/146 reference: https://github.com/actions/runner-images/issues/668