-
Notifications
You must be signed in to change notification settings - Fork 438
48 lines (40 loc) · 1.25 KB
/
docker-testbed-periodic-rebuild.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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