Skip to content

Commit 4979fc8

Browse files
committed
update github action
1 parent cdcb575 commit 4979fc8

5 files changed

Lines changed: 16 additions & 10 deletions

File tree

.github/scripts/on_release_deleted.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ COMPONENT="$1"
55
TAG="$2"
66
VERSION="${TAG#v}"
77
REPO_NAME="subvortex-${COMPONENT//_/-}"
8-
IMAGE="ghcr.io/${GITHUB_REPOSITORY_OWNER}/$REPO_NAME"
8+
IMAGE="ghcr.io/$GITHUB_REPOSITORY_OWNER/$REPO_NAME"
99

1010
GHCR_USERNAME="${GHCR_USERNAME:-}"
1111
GHCR_TOKEN="${GHCR_TOKEN:-}"

.github/scripts/on_release_pushed.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ IS_DRAFT="$4"
88

99
VERSION="${RAW_VERSION_TAG#v}"
1010
REPO_NAME="subvortex-${COMPONENT//_/-}"
11-
IMAGE="ghcr.io/${GITHUB_REPOSITORY_OWNER}/$REPO_NAME"
11+
IMAGE="ghcr.io/$GITHUB_REPOSITORY_OWNER/$REPO_NAME"
1212

1313
if [[ "$IS_DRAFT" == "true" ]]; then
1414
echo "⏭️ Skipping draft release"

.github/scripts/on_tag_deleted.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ TAG="$3"
77

88
VERSION="${TAG#v}"
99
REPO_NAME="subvortex-${COMPONENT//_/-}"
10-
IMAGE="ghcr.io/${GITHUB_REPOSITORY_OWNER}/$REPO_NAME"
10+
IMAGE="ghcr.io/$GITHUB_REPOSITORY_OWNER/$REPO_NAME"
1111

1212
GHCR_USERNAME="${GHCR_USERNAME:-}"
1313
GHCR_TOKEN="${GHCR_TOKEN:-}"

.github/scripts/on_tag_pushed.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ WHEEL_IMAGE="$2"
66
VERSION_TAG="$3"
77

88
REPO_NAME="subvortex-${COMPONENT//_/-}"
9-
IMAGE="ghcr.io/${GITHUB_REPOSITORY_OWNER}/$REPO_NAME"
9+
IMAGE="ghcr.io/$GITHUB_REPOSITORY_OWNER/$REPO_NAME"
1010
VERSION="${VERSION_TAG#v}"
1111
DOCKERFILE="subvortex/$COMPONENT/Dockerfile"
1212

@@ -40,12 +40,8 @@ docker buildx build \
4040
--build-arg COMPONENT_VERSION="$COMPONENT_VERSION" \
4141
--cache-from=type=gha,scope=wheels_${COMPONENT}_amd64 \
4242
--cache-to=type=gha,mode=max,scope=wheels_${COMPONENT}_amd64 \
43+
--label "org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY}" \
4344
--tag "$IMAGE:$VERSION" \
4445
--file "$DOCKERFILE" \
4546
--push \
46-
.
47-
# echo "🌍 Making image public: $IMAGE"
48-
49-
# # Needs gh CLI installed and authenticated (GH_TOKEN must be available in env)
50-
# PACKAGE_NAME="container/${REPO_NAME}"
51-
# gh api --method PATCH "/user/packages/${PACKAGE_NAME}/visibility" --field visibility=public
47+
.

.github/workflows/docker-workflow.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ jobs:
7979
sudo apt-get update
8080
sudo apt-get install -y qemu-user-static binfmt-support
8181
docker run --privileged --rm tonistiigi/binfmt --install all || true
82+
83+
- name: 🛠 Install GitHub CLI
84+
run: |
85+
sudo apt-get update
86+
sudo apt-get install -y gh
8287
8388
- name: 🧱 Set up Docker Buildx
8489
uses: docker/setup-buildx-action@v2
@@ -168,6 +173,11 @@ jobs:
168173
sudo apt-get update
169174
sudo apt-get install -y qemu-user-static binfmt-support
170175
docker run --privileged --rm tonistiigi/binfmt --install all || true
176+
177+
- name: 🛠 Install GitHub CLI
178+
run: |
179+
sudo apt-get update
180+
sudo apt-get install -y gh
171181
172182
- name: 🧱 Set up Docker Buildx
173183
uses: docker/setup-buildx-action@v2

0 commit comments

Comments
 (0)