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
65 changes: 65 additions & 0 deletions .github/workflows/manual-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Manual Deploy

on:
workflow_dispatch:

env:
REGISTRY: ghcr.io

jobs:
build-and-publish-image:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/fuellabs/sway-playground
tags: |
type=sha,prefix=

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to the ghcr.io registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push the image to ghcr.io
uses: docker/build-push-action@v3
with:
context: .
file: deployment/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
no-cache: true
cache-from: type=gha
cache-to: type=gha,mode=max

deploy:
needs: build-and-publish-image
runs-on: buildjet-4vcpu-ubuntu-2204
env:
CONFIG: 'fuel-prod-1'
steps:
- name: Set Environment Variables
run: |
tag=$(echo $GITHUB_SHA | cut -c1-7)
echo "IMAGE_TAG=$tag" >> $GITHUB_ENV

- name: Deploy Sway Playground Backend Environment
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Deploy Sway Playground on k8s
repo: FuelLabs/fuel-deployment
ref: refs/heads/master
token: ${{ secrets.REPO_TOKEN }}
inputs: '{ "cluster": "${{ env.CONFIG }}", "deployment-version": "${{ github.sha }}", "image-version": "${{ env.IMAGE_TAG }}" }'
4 changes: 2 additions & 2 deletions deployment/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Build
FROM lukemathwalker/cargo-chef:latest-rust-1.81 as chef
FROM lukemathwalker/cargo-chef:latest-rust-1.87 as chef
WORKDIR /build/
# hadolint ignore=DL3008

Expand All @@ -20,7 +20,7 @@ RUN cargo chef prepare --recipe-path recipe.json
FROM chef as builder

# Install charcoal
RUN cargo install --git https://github.com/ourovoros-io/charcoal.git --rev e69a6ffaf3e7eaf9f3ceea543087ea59ec5fd5d1
RUN cargo install --git https://github.com/ourovoros-io/charcoal.git

ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
COPY --from=planner /build/recipe.json recipe.json
Expand Down
Loading