From 8573cfe3fd5e37ba4513195a2b1636a713b7d91b Mon Sep 17 00:00:00 2001 From: William Zhao Date: Wed, 15 May 2024 15:28:23 -0400 Subject: [PATCH] Add Build PR workflow Signed-off-by: William Zhao --- .github/workflows/build-pr.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build-pr.yml diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml new file mode 100644 index 00000000..e39b2f80 --- /dev/null +++ b/.github/workflows/build-pr.yml @@ -0,0 +1,31 @@ +name: Build PR + +on: + pull_request: + branches: + - main + +jobs: + build-and-push: + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set up Docker Buildx + run: | + docker buildx create --use + - name: Authenticate + uses: docker/login-action@v1 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + - name: Build and Push Multiarch image + run: | + docker buildx build \ + --file ./images/Containerfile \ + --platform linux/arm64,linux/amd64\ + --tag quay.io/wizhao/tft-tools:pr_test \ + --push .