From 1486bf2415c934b249ff1b582315a3fffcdf5d2d Mon Sep 17 00:00:00 2001 From: Emile Nijssen Date: Mon, 10 Jan 2022 22:33:32 -0800 Subject: [PATCH] change auto-deploy to nightly --- .github/workflows/deploy-nightly.yml | 38 ++++++++++++++++++++++++++++ .github/workflows/deploy.yml | 2 -- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy-nightly.yml diff --git a/.github/workflows/deploy-nightly.yml b/.github/workflows/deploy-nightly.yml new file mode 100644 index 0000000..efff952 --- /dev/null +++ b/.github/workflows/deploy-nightly.yml @@ -0,0 +1,38 @@ +name: Build & Publish Docker Image to Docker Hub + +on: + workflow_dispatch: + schedule: + - cron: "0 12 * * *" + +jobs: + deploy: + name: Build & Deploy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: production + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + # Set environment variables + - run: echo RELEASE=$(cat ./src/package.json | jq -r .release) >> $GITHUB_ENV + + # Build & Publish + - name: Build & Publish Docker Image + uses: docker/build-push-action@v2 + with: + push: true + platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8 + tags: weejewel/wg-easy:nightly, weejewel/wg-easy:${{ env.RELEASE }}-nightly diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 46bc6d4..9cd4f5f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,8 +10,6 @@ on: - staging/** - production - production/** - schedule: - - cron: "0 12 * * *" jobs: deploy: