Skip to content

Commit 9c7441d

Browse files
authored
Migrate to GitHub Actions
Closes whatwg/meta#173.
1 parent e940420 commit 9c7441d

File tree

4 files changed

+48
-31
lines changed

4 files changed

+48
-31
lines changed

.github/workflows/build.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
push:
7+
branches:
8+
- master
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-20.04
13+
env:
14+
IMAGE_NAME: whatwg/html-build
15+
steps:
16+
- name: Checkout whatwg/html-build
17+
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
- name: Shellcheck
21+
run: |
22+
shellcheck *.sh
23+
shellcheck ci-build/*.sh
24+
- name: Docker build
25+
run: ci-build/docker-build.sh
26+
- name: Checkout whatwg/html
27+
uses: actions/checkout@v2
28+
with:
29+
repository: whatwg/html
30+
path: html
31+
fetch-depth: 2
32+
- name: Test against whatwg/html
33+
run: |
34+
mkdir output
35+
bash ci-build/docker-run.sh "$GITHUB_WORKSPACE/html" output
36+
- name: Docker login
37+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
38+
uses: docker/login-action@v1
39+
with:
40+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
41+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
42+
- name: Docker push
43+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
44+
run: |
45+
docker tag "$IMAGE_NAME" "$IMAGE_NAME:$GITHUB_SHA"
46+
docker tag "$IMAGE_NAME" "$IMAGE_NAME:latest"
47+
docker push "$IMAGE_NAME:$GITHUB_SHA"
48+
docker push "$IMAGE_NAME:latest"

.travis.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

ci-build/docker-build.sh

100644100755
File mode changed.

ci-build/docker-run.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)