From 85e1b65a8f0a3cb651fde55b4d55d47fe74a9622 Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 28 Mar 2023 18:57:22 +0200 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4af70d0 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: Build + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - + name: Build the Docker image + run: docker build . --file Dockerfile --tag kroese/virtual-dsm:latest --tag kroese/virtual-dsm:${{ secrets.MAJOR }}.${{ secrets.MINOR }} + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Push to DockerHub + run: docker push kroese/virtual-dsm:${{ secrets.MAJOR }}.${{ secrets.MINOR }} && docker push kroese/virtual-dsm:latest + - + name: Update Minor version + uses: hmanzur/actions-set-secret@v2.0.0 + with: + name: 'MINOR' + value: $((${{ secrets.MINOR }}+1)) + repository: kroese/virtual-dsm + token: ${{ secrets.REPO_ACCESS_TOKEN }}