Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ jobs:
platforms: ${{ steps.plan.outputs.platforms }}
steps:
- id: plan
env:
PLATFORMS_TO_BUILD: ${{ inputs.platforms-to-build }}
run: |
IFS=',' read -ra ARR <<< "${{ inputs.platforms-to-build }}"
IFS=',' read -ra ARR <<< "$PLATFORMS_TO_BUILD"
JSON=$(printf '%s\n' "${ARR[@]}" | jq -R . | jq -sc .)
echo "platforms=$JSON" >> "$GITHUB_OUTPUT"

Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,34 @@ jobs:
merge-multiple: false

- name: Set up values
env:
DH_REPOSITORY_OWNER: ${{ inputs.dh-repository-owner }}
PUSH_LATEST: ${{ inputs.push-latest }}
VERSION: ${{ inputs.version }}
REF_TYPE: ${{ github.ref_type }}
run: |
DIGEST_REFS=""
for f in /tmp/digests/*/digest.txt; do
D=$(cat "$f")
DIGEST_REFS="$DIGEST_REFS ${{ inputs.dh-repository-owner }}/lightningd@${D}"
DIGEST_REFS="$DIGEST_REFS ${DH_REPOSITORY_OWNER}/lightningd@${D}"
done
echo "DIGEST_REFS=$DIGEST_REFS" >> $GITHUB_ENV

if [[ "${{ inputs.push-latest }}" == "true" ]] ||
([[ "${{ github.ref_type }}" == "tag" ]] && [[ ! "${{ inputs.version }}" =~ rc ]]); then
if [[ "$PUSH_LATEST" == "true" ]] ||
([[ "$REF_TYPE" == "tag" ]] && [[ ! "$VERSION" =~ rc ]]); then
echo "PUSHLATEST=true" >> $GITHUB_ENV
else
echo "PUSHLATEST=false" >> $GITHUB_ENV
fi

- name: Create and push real tag(s)
env:
DH_REPOSITORY_OWNER: ${{ inputs.dh-repository-owner }}
VERSION: ${{ inputs.version }}
TAG_SUFFIX: ${{ matrix.tag_suffix }}
run: |
TAG_ARGS=(-t "${{ inputs.dh-repository-owner }}/lightningd:${{ inputs.version }}${{ matrix.tag_suffix }}")
TAG_ARGS=(-t "${DH_REPOSITORY_OWNER}/lightningd:${VERSION}${TAG_SUFFIX}")
if [[ "$PUSHLATEST" == "true" ]]; then
TAG_ARGS+=(-t "${{ inputs.dh-repository-owner }}/lightningd:latest${{ matrix.tag_suffix }}")
TAG_ARGS+=(-t "${DH_REPOSITORY_OWNER}/lightningd:latest${TAG_SUFFIX}")
fi
docker buildx imagetools create "${TAG_ARGS[@]}" $DIGEST_REFS
13 changes: 9 additions & 4 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,21 @@ jobs:

- name: Determine PyPI distribution location
id: set-values
env:
DIST_LOCATION: ${{ inputs.dist-location }}
REF_TYPE: ${{ github.ref_type }}
VERSION: ${{ inputs.version }}
EVENT_DIST_LOCATION: ${{ github.event.inputs.dist-location }}
run: |
if [[ "${{ inputs.dist-location }}" != "" ]]; then
DISTLOCATION="${{ inputs.dist-location }}"
elif [[ "${{ github.ref_type }}" == "tag" ]] && [[ ! "${{ inputs.version }}" =~ rc ]]; then
if [[ -n "$DIST_LOCATION" ]]; then
DISTLOCATION="$DIST_LOCATION"
elif [[ "$REF_TYPE" == "tag" ]] && [[ ! "$VERSION" =~ rc ]]; then
DISTLOCATION="prod"
else
DISTLOCATION="test"
fi
echo "DISTLOCATION=$DISTLOCATION" >> "$GITHUB_OUTPUT"
echo "EVENT DISTLOCATION: ${{ github.event.inputs.dist-location }}"
echo "EVENT DISTLOCATION: $EVENT_DIST_LOCATION"
echo "Resolved dist-location: $DISTLOCATION"

- name: Install uv
Expand Down
Loading