From 2b6e2e94a2a237d9f04efbf444377d11b50455f8 Mon Sep 17 00:00:00 2001 From: Jennings Zhang Date: Mon, 14 Mar 2022 11:22:10 -0400 Subject: [PATCH] Add :dev build --- .github/workflows/dev.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/dev.yml diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml new file mode 100644 index 00000000..6f5ab43c --- /dev/null +++ b/.github/workflows/dev.yml @@ -0,0 +1,35 @@ +name: dev + +on: + push: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Get info + id: determine + run: echo "::set-output name=repo::${GITHUB_REPOSITORY,,}" + - uses: docker/setup-buildx-action@v1 + id: buildx + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - name: Build and push + uses: docker/build-push-action@v2 + with: + build-args: ENVIRONMENT=local + push: true + tags: "${{ steps.determine.outputs.repo }}:dev" + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache