From f4250dc0922f0cd73ea2c044351e229a52478bbd Mon Sep 17 00:00:00 2001 From: lwch Date: Mon, 17 Oct 2022 16:02:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9actions=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-builder-image.yml | 35 +++++++++++++++++++++++ .github/workflows/build-release-image.yml | 30 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 .github/workflows/build-builder-image.yml create mode 100644 .github/workflows/build-release-image.yml diff --git a/.github/workflows/build-builder-image.yml b/.github/workflows/build-builder-image.yml new file mode 100644 index 0000000..f80ae1e --- /dev/null +++ b/.github/workflows/build-builder-image.yml @@ -0,0 +1,35 @@ +name: build-builder + +on: + push: + branches: [ builder ] + schedule: + - cron: '30 0 * * *' + +env: + GO_VERSION: 1.19.2 + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: builder + + - uses: docker/setup-qemu-action@v2 + - uses: docker/setup-buildx-action@v2 + + - uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - uses: docker/build-push-action@v3 + with: + context: . + push: true + tags: lwch/natpass-builder:${{ env.GO_VERSION }} + build-args: | + GO_VERSION=${{ env.GO_VERSION }} \ No newline at end of file diff --git a/.github/workflows/build-release-image.yml b/.github/workflows/build-release-image.yml new file mode 100644 index 0000000..7c5ebcd --- /dev/null +++ b/.github/workflows/build-release-image.yml @@ -0,0 +1,30 @@ +name: build-release + +on: + push: + branches: [ release ] + schedule: + - cron: '30 0 * * *' + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: release + + - uses: docker/setup-qemu-action@v2 + - uses: docker/setup-buildx-action@v2 + + - uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - uses: docker/build-push-action@v3 + with: + context: . + push: true + tags: lwch/natpass-release \ No newline at end of file