-
Notifications
You must be signed in to change notification settings - Fork 109
Add nightly schedule to Docker CD workflow #813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
guggero
merged 3 commits into
lightninglabs:master
from
dstadulis:cd-nightly-docker-builds
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,15 +4,24 @@ on: | |
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| schedule: | ||
| # Every day at midnight (UTC). | ||
| - cron: '0 0 * * *' | ||
| # Manual trigger through the UI for testing. | ||
| workflow_dispatch: | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| env: | ||
| DOCKER_REPO: lightninglabs | ||
| DOCKER_IMAGE: lightning-terminal | ||
| DOCKER_ORG: lightninglabs | ||
| DOCKER_REPO: lightning-terminal | ||
| NIGHTLY_DOCKER_REPO: lightning-terminal-nightly | ||
| # TODO(guggero): Change the branch to 'master' once the experimental branch is | ||
| # merged into master. | ||
| NIGHTLY_BRANCH_NAME: 0-19-staging | ||
guggero marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| NIGHTLY_TAG_NAME: experimental-daily-testing | ||
|
|
||
| jobs: | ||
| main: | ||
|
|
@@ -30,16 +39,29 @@ jobs: | |
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_API_KEY }} | ||
|
|
||
| # Make it possible to use different values for the version (used for git | ||
| # checkout) and the image tag (used for the docker image tag). | ||
| - name: Set env | ||
| run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
| run: | | ||
| echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
| echo "IMAGE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
guggero marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # The daily/nightly build (or manual trigger) will always use the | ||
| # experimental branch and push to a different docker repo. | ||
| - name: Set daily tag | ||
| if: ${{ github.event.schedule == '0 0 * * *' || github.event_name == 'workflow_dispatch' }} | ||
| run: | | ||
| echo "RELEASE_VERSION=${{env.NIGHTLY_BRANCH_NAME}}" >> $GITHUB_ENV | ||
| echo "DOCKER_REPO=${{env.NIGHTLY_DOCKER_REPO}}" >> $GITHUB_ENV | ||
| echo "IMAGE_TAG=${{env.NIGHTLY_TAG_NAME}}-$(date -u +%Y%m%d)" >> $GITHUB_ENV | ||
|
|
||
| - name: Build and push default image | ||
| id: docker_build | ||
| uses: lightninglabs/gh-actions/[email protected] | ||
| with: | ||
| push: true | ||
| platforms: linux/amd64,linux/arm64 | ||
| tags: "${{ env.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }}:${{ env.RELEASE_VERSION }}" | ||
| tags: "${{ env.DOCKER_ORG }}/${{ env.DOCKER_REPO }}:${{ env.IMAGE_TAG }}" | ||
| build-args: checkout=${{ env.RELEASE_VERSION }} | ||
|
|
||
| - name: Build and push image with /lit path | ||
|
|
@@ -48,7 +70,7 @@ jobs: | |
| with: | ||
| push: true | ||
| platforms: linux/amd64,linux/arm64 | ||
| tags: "${{ env.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }}:${{ env.RELEASE_VERSION }}-path-prefix" | ||
| tags: "${{ env.DOCKER_ORG }}/${{ env.DOCKER_REPO }}:${{ env.IMAGE_TAG }}-path-prefix" | ||
| build-args: | | ||
| checkout=${{ env.RELEASE_VERSION }} | ||
| public_url=/lit | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.