Skip to content

Commit

Permalink
Github workflow overrides for Lightning Labs
Browse files Browse the repository at this point in the history
Expects the following GitHub Secrets:

DOCKER_USERNAME: user to login to DockerHub
DOCKER_API_KEY: password/token to login to DockerHub
  • Loading branch information
thinkmassive authored and guggero committed May 22, 2023
1 parent e8a8536 commit 34f5ab7
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
LATEST_BITCOIN_MAJOR_VERSION=$(find . -type d -maxdepth 1 -not -path '*/\.*' | sort -n | tail -n 1 | cut -c 3-)
PLATFORMS="linux/amd64"
PUSH=false
REPO=ruimarinho/bitcoin-core
REPO=${{ github.repository_owner }}/bitcoin-core
TAGS=()
if [[ $GITHUB_REF == refs/tags/* ]]; then
Expand Down Expand Up @@ -96,17 +96,17 @@ jobs:
echo ::set-output name=build_date::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=docker_platforms::${PLATFORMS}
echo ::set-output name=docker_username::ruimarinho
echo ::set-output name=docker_username::${{ secrets.DOCKER_USERNAME }}
echo ::set-output name=push::${PUSH}
echo ::set-output name=tags::${TAGS[@]}
echo ::set-output name=build::true
- if: ${{ steps.prepare.outputs.build }} == 'true'
name: Login into Docker Hub
uses: docker/login-action@v1
uses: lightninglabs/gh-actions/login-action@2021.01.25.00
with:
username: ruimarinho
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_API_KEY }}

- if: ${{ steps.prepare.outputs.build }} == 'true'
name: Build Docker image
Expand All @@ -133,3 +133,8 @@ jobs:
--build-arg "VCS_REF=${GITHUB_SHA::8}" \
$(printf "%s" "${TAGS[@]/#/ --tag }" ) \
${{ matrix.version }}/
- if: ${{ steps.prepare.outputs.build }} == 'true'
name: Clear Docker credentials
run: |
rm -f ${HOME}/.docker/config.json

0 comments on commit 34f5ab7

Please sign in to comment.