From 26cb717a0891821403800a04735bd5fd2a502567 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sun, 23 Apr 2023 01:00:27 +0800 Subject: [PATCH] build when push to non-main branch --- .github/workflows/non-main-branch-build.yml | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/non-main-branch-build.yml diff --git a/.github/workflows/non-main-branch-build.yml b/.github/workflows/non-main-branch-build.yml new file mode 100644 index 00000000..67a1fcc1 --- /dev/null +++ b/.github/workflows/non-main-branch-build.yml @@ -0,0 +1,28 @@ +name: Docker Snapshot + +on: + push: + branches-ignore: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - + name: Build + uses: docker/build-push-action@v2 + with: + file: Dockerfile + context: . + platforms: linux/amd64 + push: false \ No newline at end of file