Skip to content

Commit

Permalink
attempt to build container from actions
Browse files Browse the repository at this point in the history
  • Loading branch information
matyson committed Jan 19, 2024
1 parent 7a63a7e commit b55cda7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 14 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# build and publish docker image to ghcr
name: deepsirius-ui
on:
push:
tags:
- 'v*'
branches:
- no-xstate
jobs:
build_and_push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
TAG: ${{ github.ref_name }}
REGISTRY: ghcr.io/${{ github.repository_owner }}
IMAGE_NAME: ${{ github.repository }}
HOSTNAME: localhost
TREE_PATH: /ibira
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build image
run: docker build -t $REGISTRY/$IMAGE_NAME:$TAG --build-arg NEXT_PUBLIC_TREE_PATH=$TREE_PATH .

- name: Login to ghcr
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push image
run: docker push $REGISTRY/$IMAGE_NAME:$TAG
15 changes: 1 addition & 14 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,8 @@ services:
dockerfile: Dockerfile
args:
# build time variables
# builder build variables
# only NEXT_PUBLIC variables needed?
NEXT_PUBLIC_TREE_PATH: '${NEXT_PUBLIC_TREE_PATH}'
DATABASE_URL: ${DATABASE_URL}
CA_CERT: '${CA_CERT}'
NEXTAUTH_URL: ${NEXTAUTH_URL}
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
LDAP_URI: ${LDAP_URI}
SSH_HOST: ${SSH_HOST}
PROCESSING_CONTAINER_STORAGE_BIND: ${PROCESSING_CONTAINER_STORAGE_BIND}
PROCESSING_CONTAINER_PATH: ${PROCESSING_CONTAINER_PATH}
# runner build variables
CA_CERT_HOST: '${CA_CERT_HOST}'
# secrets:
# - ca-certificate
working_dir: /app
volumes:
- ./dev.sqlite:/app/prisma/db.sqlite:rw
Expand All @@ -40,6 +28,5 @@ services:
- CA_CERT=${CA_CERT}
- DATABASE_URL=${DATABASE_URL}
- PRIVATE_KEY_PASSPHRASE=${PRIVATE_KEY_PASSPHRASE}
- NEXT_PUBLIC_TREE_PATH=${NEXT_PUBLIC_TREE_PATH}
- PROCESSING_CONTAINER_PATH=${PROCESSING_CONTAINER_PATH}
- PROCESSING_CONTAINER_STORAGE_BIND=${PROCESSING_CONTAINER_STORAGE_BIND}

0 comments on commit b55cda7

Please sign in to comment.