Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# https://docs.github.com/en/actions/tutorials/publish-packages/publish-docker-images

name: Build Docker Image

on: workflow_dispatch
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- uses: actions/checkout@v5
- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- uses: docker/build-push-action@v6
id: push
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- uses: actions/attest-build-provenance@v3
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
34 changes: 34 additions & 0 deletions .github/workflows/build-ynoengine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build ynoengine
on:
push:
branches:
- master
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-docker:
runs-on: ubuntu-latest
permissions:
contents: write
packages: read
steps:
- uses: actions/checkout@v5
- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: |
REPO="${{ github.repository }}"
docker run -v $(pwd):/root/workdir/ynoengine:rw -e PLAYER_PSK="${{ secrets.PSK }}" ghcr.io/${REPO,,}:master
docker run -v $(pwd):/root/workdir/ynoengine:rw -e PLAYER_PSK="${{ secrets.PSK }}" -e NO_SIMD=1 ghcr.io/${REPO,,}:master
echo "TAG=$(date +'%Y-%m-%d.%H.%M.%S')" >> $GITHUB_ENV
- uses: softprops/action-gh-release@v3
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we most likely build local then deploy straight to server this step is probably not needed; could provide instructions to build local instead

with:
tag_name: ${{ env.TAG }}
files: |
build/ynoengine.js
build/ynoengine.wasm
build/ynoengine-simd.js
build/ynoengine-simd.wasm
27 changes: 0 additions & 27 deletions .github/workflows/pr_labels.yml

This file was deleted.

93 changes: 0 additions & 93 deletions .github/workflows/stable-compilation.yml

This file was deleted.

Loading
Loading