generated from loopystudios/bevy-shell-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (52 loc) · 1.61 KB
/
release-dockerhub.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: release-dockerhub
on:
push:
tags:
- "v*.*.*"
env:
RELEASE_NAME: my_game
jobs:
setup:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version-tag.outputs.VERSION }}
steps:
- name: Get tagged version
id: version-tag
run: echo "::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}"
release-wasm:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Trunk
uses: jetli/[email protected]
with:
version: "latest"
- name: Trunk Build
run: |
trunk build --release
## Deploy - Docker Server
# Qemu is an emulator for alternative architectures
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# Buildx allows us to build for several architectures
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Login to DockerHub - Setup your secrets! Check out the README.
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Push HTTP server Docker image
- name: Push to DockerHub
uses: docker/build-push-action@v3
with:
context: ./launchers/wasm
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.RELEASE_NAME }}:${{ needs.setup.outputs.version }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.RELEASE_NAME }}:latest