diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 70ab685..be504c2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,9 @@ -name: build +name: Build on: [push, pull_request] jobs: - build: + test: runs-on: ubuntu-latest steps: @@ -18,8 +18,15 @@ jobs: LICENSE_KEY: ${{ secrets.LICENSE_KEY }} RUN_INTERVAL: "false" run: npm test - - name: Publish image - uses: elgohr/Publish-Docker-Github-Action@v5 + + publish: + needs: test + if: github.event_name == 'push' + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: elgohr/Publish-Docker-Github-Action@v5 with: name: hakanensari/country username: ${{ secrets.DOCKER_USERNAME }}