diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 04a9fed..eed3298 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,15 +2,12 @@ name: Build add-on env: MONITORED_FILES: "apparmor.txt build.yaml config.yaml Dockerfile data rootfs" on: - workflow_dispatch: release: types: [published] - push: - branch: [main] jobs: build: runs-on: ubuntu-latest - name: Deploy + name: Deploy ${{ github.ref }} strategy: matrix: arch: ["aarch64", "amd64", "armhf", "armv7", "i386"] @@ -19,10 +16,6 @@ jobs: - name: Check out repository uses: actions/checkout@v3 - - name: Get the version - id: get_version - run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)-g$(echo ${{ github.sha }} | cut -c1-5 ) - - name: Login to DockerHub uses: docker/login-action@v2.0.0 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..719f046 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: Build add-on +env: + MONITORED_FILES: "apparmor.txt build.yaml config.yaml Dockerfile data rootfs" +on: + workflow_dispatch: + push: + branch: [main] +jobs: + build: + runs-on: ubuntu-latest + name: Test ${{ github.sha }} + strategy: + matrix: + arch: ["aarch64", "amd64", "armhf", "armv7", "i386"] + + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Login to DockerHub + uses: docker/login-action@v2.0.0 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + + - name: Publish + uses: home-assistant/builder@2022.03.1 + with: + args: | + --test \ + --${{ matrix.arch }} \ + --target . \ No newline at end of file