Fix system error caused by async function without await (#23) #5
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
name: Build and Push | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- name: with rootfs | |
image-name: menci/syzoj-judge | |
dockerfile: Dockerfile | |
- name: without rootfs | |
image-name: menci/syzoj-judge-norootfs | |
dockerfile: Dockerfile.NOROOTFS | |
name: Build and Push (${{ matrix.target.name }}) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/#-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Generate Tag List | |
run: | | |
echo "TAGS<<EOF" >> $GITHUB_ENV | |
HASH_SHORT="$(git rev-parse --short HEAD)" | |
echo $IMAGE_NAME:$HASH_SHORT >> $GITHUB_ENV | |
echo $IMAGE_NAME:latest >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
env: | |
IMAGE_NAME: ${{ matrix.target.image-name }} | |
- name: Build and Push | |
uses: docker/build-push-action@v2 | |
with: | |
platforms: linux/amd64 | |
push: true | |
tags: ${{ env.TAGS }} | |
file: ${{ matrix.target.dockerfile }} |