From e0d003344e6e2997c8e827bedd80688d2a640a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20Lu=C3=ADs?= Date: Mon, 29 Apr 2024 13:42:42 -0300 Subject: [PATCH] build container on ci --- .github/workflows/container.yml | 35 +++++++++++++++++++++++++++++++++ README.md | 6 +++--- 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/container.yml diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml new file mode 100644 index 0000000..f4b1beb --- /dev/null +++ b/.github/workflows/container.yml @@ -0,0 +1,35 @@ +# build and publish docker image to ghcr +name: tb_waiter +on: + push: + tags: + - "v*" + branches: + - main +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 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build app image + run: docker build -t $REGISTRY/$IMAGE_NAME:$TAG . + + - name: Login to ghcr + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Push image + run: docker push $REGISTRY/$IMAGE_NAME:$TAG diff --git a/README.md b/README.md index a2b7fa9..890213a 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,6 @@ Simple api to manage tensorboard instances on demand. - [x] clean up idle tensorboards - [x] background tasks to clean up tensorboards - [x] security token on api routes -- [] secure tensorboard instances ? -- [] test connection w/ frontend -- [] setup ci workflows \ No newline at end of file +- [ ] secure tensorboard instances ? +- [ ] test connection w/ frontend +- [x] setup ci workflows \ No newline at end of file