diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5af5244 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: "Run build and deploy" + +on: + push: + branches: [ 'master' ] + +jobs: + docker: + runs-on: ubuntu-latest + strategy: + matrix: + version: [18, 19, 20, 21] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Execute image build and push + run: | + docker build -t ghcr.io/pcvolkmer/jenkins-slave-nodejs:${{version}} ${{version}} + docker push ghcr.io/pcvolkmer/jenkins-slave-nodejs:${{version}}