-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 2.05 KB
/
dungeon-sequencer-docker.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
57
58
59
60
61
62
name: Dungeon - sequencer docker
on:
push:
branches:
- "dungeon-game"
paths:
- "10_dungeon/sequencer/**"
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set image tag vars
id: tag_vars
run: |
echo "date=$(date +%Y-%m-%dT%H-%M-%S)" >> "${GITHUB_OUTPUT}"
echo "sha_short=$(git rev-parse --short HEAD)" >> "${GITHUB_OUTPUT}"
- name: Checkout
uses: actions/checkout@v3
- name: Replace rl node endpoint
id: sed
run: |
set -x
sed -i 's|dungeon-sequencer.gcp.marigold.dev|dungeon-rollup-test1.gcp.marigold.dev|g' 10_dungeon/sequencer/sequencer-http/src/main.rs
sed -i 's|127.0.0.1|0.0.0.0|g' 10_dungeon/sequencer/sequencer-http/src/main.rs
sed -i 's|ghostnet|mainnet|g' 10_dungeon/sequencer/sequencer-http/src/main.rs
cat 10_dungeon/sequencer/sequencer-http/src/main.rs
- name: Copy Dockerfile and scripts
id: copy
run: |
cp -r ./infra_tooling/docker/dungeon-sequencer-build/* 10_dungeon
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
file: ./10_dungeon/Dockerfile.sequencer
context: ./10_dungeon/
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ github.ref == 'refs/heads/dungeon-game' }}
tags: |
ghcr.io/marigold-dev/dungeon-sequencer:latest
ghcr.io/marigold-dev/dungeon-sequencer:mainnet
ghcr.io/marigold-dev/dungeon-sequencer:${{ github.sha }}
ghcr.io/marigold-dev/dungeon-sequencer:${{ steps.tag_vars.outputs.date }}-${{ steps.tag_vars.outputs.sha_short }}