Skip to content

Fix for custom package #101

Fix for custom package

Fix for custom package #101

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build_and_push:
name: Docker image build and push to Docker Hub
runs-on: ubuntu-latest
strategy:
matrix:
application-name: ['ordertron']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get current package version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push version tagged Docker image
run: docker buildx build --platform linux/amd64,linux/arm64 --file Dockerfile --tag ${{ secrets.DOCKER_USER }}/${{ matrix.application-name }}:${{ steps.package-version.outputs.current-version}} . --push
- name: Build and push latest tagged Docker image
run: docker buildx build --platform linux/amd64,linux/arm64 --file Dockerfile --tag ${{ secrets.DOCKER_USER }}/${{ matrix.application-name }} . --push