github action에서 docker-compose job을 수행하는데, 에러가 떴다.
https://github.com/orgs/community/discussions/116610
Error: docker-compose command not found · community · Discussion #116610
Select Topic Area Bug Body If you've encountered the error "docker-compose command not found" on or about April 2, 2024, it means you're using the v1 Docker Compose command. GitHub deprecated v1, a...
github.com
위 글을 읽어보면 docker-compose가 마이그레이션되어서 v1 -> v2로 변경되었다고 한다.
- name: CoverageTest
env:
GIT_TOKEN: ${{ secrets.GIT_ACCESS_CREDENTIAL }}
run: |
if [ -z "$GIT_TOKEN" ]; then
echo "GIT_TOKEN is not set. something wrong"
exit 1
else
echo "GIT_TOKEN is set. lets go"
docker-compose build --build-arg GIT_CREDENTIAL_TOKEN=$GIT_TOKEN &&
docker-compose up --exit-code-from app
fi
위처럼 v1에는 docker-compose로 사용했다.
- name: CoverageTest
env:
GIT_TOKEN: ${{ secrets.GIT_ACCESS_CREDENTIAL }}
run: |
if [ -z "$GIT_TOKEN" ]; then
echo "GIT_TOKEN is not set. something wrong"
exit 1
else
echo "GIT_TOKEN is set. lets go"
docker compose build --build-arg GIT_CREDENTIAL_TOKEN=$GIT_TOKEN &&
docker compose up --exit-code-from app
fi
위처럼 v2에는 docker compose로 바꾸라고 한다.
성공적으로 해당 job이 수행되었다.
'git' 카테고리의 다른 글
fatal: Need to specify how to reconcile divergent branches. (0) | 2024.06.18 |
---|---|
XXXXX had recent pushes XX minutes ago (0) | 2024.06.17 |
Github chatGPT Auto CodeReview (0) | 2024.06.02 |
Github actions에서 Secrets로 환경변수 관리 (0) | 2024.04.18 |
한 컴퓨터에서 여러 깃허브 계정 사용하기 (2) | 2023.11.14 |