rgb-node #1420
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: rgb-node | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
target: | ||
type: choice | ||
description: Target | ||
required: true | ||
options: | ||
- release | ||
- nightly | ||
force: | ||
type: boolean | ||
description: Force build | ||
required: false | ||
default: false | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- docker/rgb-node/** | ||
schedule: | ||
- cron: "0 8,20 * * *" | ||
jobs: | ||
prepare: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
commit: ${{ steps.latest-commit.outputs.sha }} | ||
tag-commit-exists: ${{ steps.check-tag-commit.outputs.exists }} | ||
tag-release-exists: ${{ steps.check-tag-release.outputs.exists }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Get latest commit | ||
uses: ./.github/actions/latest-commit | ||
id: latest-commit | ||
with: | ||
repo: RGB-WG/rgb-node | ||
branch: master | ||
- name: Check if tag for latest commit exists in registry | ||
uses: ./.github/actions/check-tag | ||
id: check-tag-commit | ||
with: | ||
path: docker/rgb-node | ||
tag: ${{ steps.latest-commit.outputs.sha-short }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Check if tag for release exists in registry | ||
uses: ./.github/actions/check-tag | ||
id: check-tag-release | ||
with: | ||
path: docker/rgb-node | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
build-release: | ||
needs: prepare | ||
permissions: | ||
contents: read | ||
packages: write | ||
if: ${{ (github.event_name == 'push' || github.event.inputs.target == 'release') }} | ||
uses: ./.github/workflows/bake.yml | ||
secrets: inherit | ||
with: | ||
runs-on: self-hosted | ||
path: docker/rgb-node | ||
target: release | ||
build-nightly: | ||
needs: prepare | ||
permissions: | ||
contents: read | ||
packages: write | ||
if: ${{ (github.event_name == 'schedule' || github.event.inputs.target == 'nightly') && (github.event.inputs.force || needs.prepare.outputs.tag-commit-exists == 'false') }} | ||
uses: ./.github/workflows/bake.yml | ||
secrets: inherit | ||
with: | ||
runs-on: self-hosted | ||
path: docker/rgb-node | ||
target: nightly | ||
commit: ${{ needs.prepare.outputs.commit }} | ||
build-lnpbp-tools-release: | ||
Check failure on line 86 in .github/workflows/rgb-node.yml GitHub Actions / rgb-nodeInvalid workflow file
|
||
needs: build-release | ||
uses: ./.github/workflows/bake.yml | ||
secrets: inherit | ||
with: | ||
path: docker/lnpbp-tools | ||
target: release | ||
build-lnpbp-tools-nightly: | ||
needs: build-nightly | ||
uses: ./.github/workflows/bake.yml | ||
secrets: inherit | ||
with: | ||
path: docker/lnpbp-tools | ||
target: nightly | ||
dockerfile: Dockerfile.nightly |