Docker NodeJS Images GitHub workflow #114
This file contains 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: Docker NodeJS Images GitHub workflow | |
on: | |
pull_request: | |
branches: | |
- 'master' | |
push: | |
branches: | |
- 'master' | |
schedule: | |
- cron: '43 4 * * 0' | |
jobs: | |
build_test_maybe_release: | |
strategy: | |
matrix: | |
include: | |
- variant: '14-bullseye' | |
- variant: '16-bullseye' | |
- variant: '18-bullseye' | |
- variant: '20-bullseye' | |
- variant: '14-apache-bullseye' | |
- variant: '16-apache-bullseye' | |
- variant: '18-apache-bullseye' | |
- variant: '20-apache-bullseye' | |
- variant: '14-bullseye-build' | |
- variant: '16-bullseye-build' | |
- variant: '18-bullseye-build' | |
- variant: '20-bullseye-build' | |
- variant: '14-apache-bullseye-build' | |
- variant: '16-apache-bullseye-build' | |
- variant: '18-apache-bullseye-build' | |
- variant: '20-apache-bullseye-build' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- uses: actions/checkout@v1 | |
- name: Login to DockerHub | |
# Merge ~ push. | |
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build, test and push | |
env: | |
EVENT_NAME: ${{ github.event_name }} | |
GITHUB_ACTOR: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
TAG="v2-${{ matrix.variant }}" VARIANT="${{ matrix.variant }}" ./build-and-test.sh | |
docker images | grep thecodingmachine/nodejs |