mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix ghcr workflow throw error when in the fork repo. (#1203)
* fix ghcr workflow throw error when in the fork repo. * Split DOCKER_REPOSITORY for cleaner.
This commit is contained in:
parent
b9bed7da8d
commit
34286fabcc
4
.github/workflows/ghcr.yml
vendored
4
.github/workflows/ghcr.yml
vendored
@ -32,4 +32,6 @@ jobs:
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
|
||||
- name: Build and push ${{ matrix.image }}
|
||||
run: ./containers/build.sh ${{ matrix.image }} --push
|
||||
run: |
|
||||
ORG_NAME=$(echo "${{ github.repository }}" | tr '[A-Z]' '[a-z]' | cut -d '/' -f 1)
|
||||
./containers/build.sh ${{ matrix.image }} $ORG_NAME --push
|
||||
|
||||
@ -1,2 +1,4 @@
|
||||
DOCKER_REPOSITORY=ghcr.io/opendevin/opendevin
|
||||
DOCKER_REGISTRY=ghcr.io
|
||||
DOCKER_ORG=opendevin
|
||||
DOCKER_IMAGE=opendevin
|
||||
DOCKER_BASE_DIR="."
|
||||
|
||||
@ -2,8 +2,9 @@
|
||||
set -eo pipefail
|
||||
|
||||
image_name=$1
|
||||
org_name=$2
|
||||
push=0
|
||||
if [[ $2 == "--push" ]]; then
|
||||
if [[ $3 == "--push" ]]; then
|
||||
push=1
|
||||
fi
|
||||
|
||||
@ -31,6 +32,10 @@ if [ ! -f $dir/config.sh ]; then
|
||||
exit 1
|
||||
fi
|
||||
source $dir/config.sh
|
||||
if [[ -n "$org_name" ]]; then
|
||||
DOCKER_ORG="$org_name"
|
||||
fi
|
||||
DOCKER_REPOSITORY=$DOCKER_REGISTRY/$DOCKER_ORG/$DOCKER_IMAGE
|
||||
echo "Repo: $DOCKER_REPOSITORY"
|
||||
echo "Base dir: $DOCKER_BASE_DIR"
|
||||
#docker pull $DOCKER_REPOSITORY:main || true # try to get any cached layers
|
||||
|
||||
@ -1,2 +1,4 @@
|
||||
DOCKER_REPOSITORY=ghcr.io/opendevin/eval-swe-bench
|
||||
DOCKER_REGISTRY=ghcr.io
|
||||
DOCKER_ORG=opendevin
|
||||
DOCKER_IMAGE=eval-swe-bench
|
||||
DOCKER_BASE_DIR=evaluation/SWE-bench
|
||||
|
||||
@ -1,2 +1,4 @@
|
||||
DOCKER_REPOSITORY=ghcr.io/opendevin/sandbox
|
||||
DOCKER_REGISTRY=ghcr.io
|
||||
DOCKER_ORG=opendevin
|
||||
DOCKER_IMAGE=sandbox
|
||||
DOCKER_BASE_DIR="."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user