Skip to content

Commit

Permalink
.github: Add period rebuild for docker-js-testbed
Browse files Browse the repository at this point in the history
  • Loading branch information
ix5 committed Apr 28, 2024
1 parent dc30552 commit 9a37f0c
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/docker-testbed-periodic-rebuild.yaml
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

0 comments on commit 9a37f0c

Please sign in to comment.