Update .env.testnet.ts #161
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: Develop Branch Frontend Pipeline | |
on: | |
push: | |
branches: | |
- develop | |
env: | |
ENV: "dev" | |
APP: "state-channel-demo-frontend" | |
concurrency: state_channel_demo_develop_environment | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
name: State channel demo frontend build docker | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 100 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up Docker Buildx | |
id: buildx | |
# Use the action from the master, as we've seen some inconsistencies with @v1 | |
# Issue: https://github.com/docker/build-push-action/issues/286 | |
uses: docker/setup-buildx-action@master | |
# Only worked for us with this option on �♂️ | |
with: | |
install: true | |
- name: Cache Docker layers | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
# Key is named differently to avoid collision | |
key: ${{ runner.os }}-${{ env.ENV }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.ENV }}-buildx | |
- name: Get commit sha on PR Sync | |
if: github.event_name == 'push' | |
id: git-sha | |
shell: bash | |
run: | | |
echo GIT_SHA=$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT | |
- name: Log in to dockerhub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_PASS }} | |
- name: Extract metadata for docker | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: aeternitybot/state-channel-demo-frontend | |
tags: | | |
type=raw,value=develop,enable=${{ endsWith(GitHub.ref, 'develop') }} | |
- name: Build and push docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./client/Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
VITE_NODE_ENV=staging | |
VITE_BOT_SERVICE_URL=https://develop-state-channel-demo-backend.dev.aepps.com | |
VITE_CLIENT_PORT=8000 | |
VITE_NODE_URL=https://testnet.aeternity.io | |
VITE_COMPILER_URL=https://compiler.aepps.com | |
VITE_WS_URL=wss://testnet.aeternity.io/channel | |
VITE_FAUCET_PUBLIC_ADDRESS=ak_2iBPH7HUz3cSDVEUWiHg76MZJ6tZooVNBmmxcgVK6VV8KAE688 | |
VITE_NETWORK_ID=ae_uat | |
VITE_RESPONDER_HOST=localhost | |
VITE_RESPONDER_PORT=3333 | |
cache-from: type=local,src=/tmp/.buildx-cache | |
# Note the mode=max here | |
# More: https://github.com/moby/buildkit#--export-cache-options | |
# And: https://github.com/docker/buildx#--cache-tonametypetypekeyvalue | |
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new | |
- name: Move cache | |
if: github.event_name == 'pull_request' && github.event.action == 'opened' || github.event.action == 'synchronize' | |
run: | | |
rm -rf /tmp/.buildx-cache | |
mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
- uses: actions/checkout@v2 | |
with: | |
repository: aeternity/gitops-apps.git | |
ref: dev | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Latest Develop Branch Deploy on Push | |
if: github.event_name == 'push' | |
uses: aeternity/ae-github-actions/argocd-pr-sync@v4 | |
with: | |
git-sha: ${{ steps.git-sha.outputs.GIT_SHA }} | |
url-prefix: develop | |
env: ${{ env.ENV }} | |
app: ${{ env.APP }} | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
repository: aeternity/gitops-apps | |
github_token: ${{ secrets.BOT_GITHUB_TOKEN }} | |
branch: dev |