Skip to content

add note

add note #184

name: Dev - Build and Test
on:
push:
branches-ignore:
- main
workflow_dispatch:
jobs:
build-magicalauth:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract GitHub info
run: |
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | sed 's/[^a-zA-Z0-9._-]/-/g')" >> $GITHUB_ENV
echo "ORG_NAME=$(echo ${{ github.repository }} | cut -d'/' -f 1 | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "GITHUB_USER=$(echo ${{ github.actor }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f 2 | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
id: extract_branch
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ env.GITHUB_USER }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64/v8
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
ghcr.io/${{ env.ORG_NAME }}/${{ env.REPO_NAME }}:dev
ghcr.io/${{ env.ORG_NAME }}/${{ env.REPO_NAME }}:${{ env.BRANCH_NAME }}
ghcr.io/${{ env.ORG_NAME }}/${{ env.REPO_NAME }}:${{ env.BRANCH_NAME }}-${{ github.sha }}
test-magicalauth:
uses: josh-xt/AGiXT/.github/workflows/operation-test-with-jupyter.yml@main
with:
notebook: tests.ipynb
image: ghcr.io/devxt-llc/magicalauth:dev
port: "12437"
additional-python-dependencies: pyotp requests qrcode
needs: build-magicalauth