diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..21e7621 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,26 @@ +name: Publish XcmsViewer Docker Image + +on: + push: + branches: + - main + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to Docker Hub + run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push Docker image + run: | + docker buildx create --use + docker buildx build --platform linux/amd64,linux/arm64 -t p2m2/docker-XcmsViewer:latest . + docker push p2m2/docker-XcmsViewer:latest