-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github: Add period rebuild for docker-js-testbed
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Rebuild js testbed image | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# Run weekly, at 2:15pm on Monday (chosen at random) | ||
# https://cron.help/#15_14_*_*_1 | ||
- cron: '15 14 * * 1' | ||
|
||
env: | ||
build_platforms: ${{ vars.BUILD_PLATFORMS || 'linux/amd64' }} | ||
build_image: ${{ vars.BUILD_IMAGE || 'ghcr.io/isso-comments/isso-js-testbed' }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
flavor: | | ||
latest=false | ||
images: ${{ env.build_image }} | ||
tags: | | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
- name: Login to Github Container Registry | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build docker-js-testbed | ||
run: make docker-testbed | ||
|
||
- name: Push docker-js-testbed image as ${{ env.build_image }} | ||
run: make docker-testbed-push |