chore: remove push to ghcr #297
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build images and push (on master branch or on schedule) | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| schedule: | |
| - cron: '0 0 * * 0' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| base-image-tag: [20-bookworm, 22-bookworm, 24-bookworm] | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Determine Java version | |
| id: java_version | |
| run: | | |
| echo 'version=17' >> $GITHUB_OUTPUT | |
| - name: Test | |
| run: | | |
| chmod +x runTests.sh && ./runTests.sh ${{ matrix.base-image-tag }} ${{ steps.java_version.outputs.version }} | |
| - name: Build | |
| run: | | |
| docker build --build-arg=BASE_IMAGE_TAG=${{ matrix.base-image-tag }} --build-arg=JAVA_VERSION=${{ steps.java_version.outputs.version }} --tag ppiper/node-browsers:${{ matrix.base-image-tag }} . | |
| - name: Tag latest image | |
| if: ${{ matrix.base-image-tag == '24-bookworm' }} | |
| run: | | |
| docker tag ppiper/node-browsers:${{ matrix.base-image-tag }} ppiper/node-browsers:latest | |
| - name: Push | |
| if: ${{ github.ref == 'refs/heads/master' }} | |
| run: | | |
| echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USER }} --password-stdin | |
| docker push ppiper/node-browsers:${{ matrix.base-image-tag }} | |
| if [ "${{ matrix.base-image-tag }}" == 24-bookworm ]; then | |
| docker push ppiper/node-browsers:latest | |
| fi |