Skip to content

Tzwitter - frontend docker #24

Tzwitter - frontend docker

Tzwitter - frontend docker #24

name: Tzwitter - frontend docker
on:
push:
branches:
- "infra-main"
paths:
- "08_tzwitter_app/app/**"
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Sed on config.ts # (yep thats bad)
run: |
set -x
sed -i '/TEZOS_RPC/d' 08_tzwitter_app/app/src/config.ts
sed -i '/ROLLUP_RPC/d' 08_tzwitter_app/app/src/config.ts
echo "export const TEZOS_RPC = 'https://rpc.ghostnet.teztnets.xyz';" >> 08_tzwitter_app/app/src/config.ts
echo "export const ROLLUP_RPC = 'https://tzwitter-rollup.gcp.marigold.dev';" >> 08_tzwitter_app/app/src/config.ts
cat 08_tzwitter_app/app/src/config.ts
- 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:
context: ./08_tzwitter_app/app/
platforms: linux/amd64
no-cache: true
push: true
tags: |
ghcr.io/marigold-dev/tzwitter-frontend:latest
ghcr.io/marigold-dev/tzwitter-frontend:${{ github.sha }}
build-args: |
TEZOS_RPC=${{ env.TEZOS_RPC }}
ROLLUP_RPC=${{ env.ROLLUP_RPC }}