-
Notifications
You must be signed in to change notification settings - Fork 89
31 lines (31 loc) · 1.21 KB
/
docker-update.yml
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
name: Update Docker image
on:
push:
# Rebuild the image when Dockerfile is changed. This is safe on a PR
# branch, too -- the automatically built Docker image will be tagged with
# the branch name instead of "latest".
paths:
- 'Dockerfile'
- '.github/workflows/docker-update.yml'
schedule:
# Rebuild the image weekly.
- cron: '0 0 * * 0'
jobs:
build-and-push:
# Forks and dependabot cannot access secrets so the job would fail.
# Run for non dependabot PRs or regular pushes to web-platform-tests/wpt.fyi
if: |
(github.repository == 'web-platform-tests/wpt.fyi' && github.actor != 'dependabot[bot]') &&
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'web-platform-tests/wpt.fyi') ||
(github.event_name != 'pull_request'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: elgohr/Publish-Docker-Github-Action@v5
# https://github.com/elgohr/Publish-Docker-Github-Action
with:
name: webplatformtests/wpt.fyi
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
dockerfile: Dockerfile
snapshot: true