From 046dc0115f2a4c001e104d211289f0d27f925afa Mon Sep 17 00:00:00 2001 From: Simon Roy Date: Wed, 6 Dec 2023 10:07:18 -0500 Subject: [PATCH] add workflow file --- .github/workflows/build_container.yml | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/build_container.yml diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml new file mode 100644 index 0000000..43b5ff2 --- /dev/null +++ b/.github/workflows/build_container.yml @@ -0,0 +1,30 @@ +name: Build and Release Docker Image + +on: + push: + branches: + - main + +jobs: + build_and_push: + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + + steps: + - name: Check out the repository + uses: actions/checkout@v2 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + run: | + IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/your-image-name:latest + docker build -t $IMAGE_NAME . + docker push $IMAGE_NAME