From e28cc242b7806a1d76bc31fd4a6eb177dac17514 Mon Sep 17 00:00:00 2001 From: Paco Xu Date: Mon, 26 Aug 2024 16:09:22 +0800 Subject: [PATCH] add action for build --- .github/workflows/build.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..33c44a9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +name: Test and Build + +on: + push: + branches: + - main + - add-action + +jobs: + + ghcr-image: + name: Build and push GHCR image + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Login + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Push to GHCR + run: | + docker build . -t ghcr.io/pacoxu/slides-crawl:latest + docker push ghcr.io/pacoxu/slides-crawl:latest + + +