feat: first commit

This commit is contained in:
devaine 2025-10-18 12:58:31 -05:00
commit ecb7899a97
No known key found for this signature in database
GPG key ID: 4BA6E50E8768348F
15 changed files with 6603 additions and 0 deletions

56
.github/workflows/build-and-deploy.yml vendored Normal file
View file

@ -0,0 +1,56 @@
# For information on GITHUB_TOKEN: https://docs.github.com/en/actions/concepts/security/github_token
# For information on github.actor: https://github.com/orgs/community/discussions/62108
name: Build and Deploy
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
env:
CONTAINER_NAME: codered-astra
CONTAINER_TAG: ghcr.io/${{ github.repository_owner }}/codered-astra:latest
jobs:
# Set permissions for the job
build:
permissions:
contents: read
packages: write
attestations: write
id-token: write
name: Build Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }} # User that commits
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ env.CONTAINER_TAG }}
# WIP: For deployment
deploy:
name: Deploy Docker Image to Server
runs-on: self-hosted
needs: build
steps: