name: Build and push docker image on: push: branches: - 'main' tags: - '*' jobs: docker: runs-on: ubuntu-latest strategy: matrix: rundeck_version: - SNAPSHOT - 3.4.7 - 3.3.11 steps: - name: Checkout uses: actions/checkout@v2 - name: Login to DockerHub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and export to Docker uses: docker/build-push-action@v2 with: build-args: "RUNDECK_VERSION=${{ matrix.rundeck_version }}" file: Dockerfile load: true tags: fretlink/rundeckforci:${{ matrix.rundeck_version }}-latest