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